From 53078c351aab844e8426ae6ae0c977804cff0a97 Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Sat, 21 Feb 2026 02:01:00 -0600 Subject: [PATCH] Initial commit: Journal.Core library + Sidecar console app --- .editorconfig | 5 + .gitignore | 52 + Journal.App/.gitignore | 10 + Journal.App/README.md | 77 + Journal.App/package-lock.json | 1886 ++++++ Journal.App/package.json | 30 + Journal.App/src-tauri/.gitignore | 7 + Journal.App/src-tauri/Cargo.lock | 5375 +++++++++++++++++ Journal.App/src-tauri/Cargo.toml | 26 + Journal.App/src-tauri/build.rs | 3 + .../src-tauri/capabilities/default.json | 11 + Journal.App/src-tauri/icons/128x128.png | Bin 0 -> 3512 bytes Journal.App/src-tauri/icons/128x128@2x.png | Bin 0 -> 7012 bytes Journal.App/src-tauri/icons/32x32.png | Bin 0 -> 974 bytes .../src-tauri/icons/Square107x107Logo.png | Bin 0 -> 2863 bytes .../src-tauri/icons/Square142x142Logo.png | Bin 0 -> 3858 bytes .../src-tauri/icons/Square150x150Logo.png | Bin 0 -> 3966 bytes .../src-tauri/icons/Square284x284Logo.png | Bin 0 -> 7737 bytes .../src-tauri/icons/Square30x30Logo.png | Bin 0 -> 903 bytes .../src-tauri/icons/Square310x310Logo.png | Bin 0 -> 8591 bytes .../src-tauri/icons/Square44x44Logo.png | Bin 0 -> 1299 bytes .../src-tauri/icons/Square71x71Logo.png | Bin 0 -> 2011 bytes .../src-tauri/icons/Square89x89Logo.png | Bin 0 -> 2468 bytes Journal.App/src-tauri/icons/StoreLogo.png | Bin 0 -> 1523 bytes Journal.App/src-tauri/icons/icon.icns | Bin 0 -> 98451 bytes Journal.App/src-tauri/icons/icon.ico | Bin 0 -> 86642 bytes Journal.App/src-tauri/icons/icon.png | Bin 0 -> 14183 bytes Journal.App/src-tauri/src/lib.rs | 478 ++ Journal.App/src-tauri/src/main.rs | 6 + Journal.App/src-tauri/tauri.conf.json | 35 + Journal.App/src/app.html | 15 + Journal.App/src/lib/backend/auth.ts | 89 + Journal.App/src/lib/backend/client.ts | 27 + Journal.App/src/lib/backend/entries.ts | 219 + Journal.App/src/lib/backend/fragments.ts | 86 + Journal.App/src/lib/backend/lists.ts | 83 + Journal.App/src/lib/backend/normalize.ts | 18 + Journal.App/src/lib/backend/templates.ts | 90 + Journal.App/src/lib/backend/todos.ts | 144 + Journal.App/src/lib/backend/types.ts | 13 + .../src/lib/components/AppModal.svelte | 158 + .../src/lib/components/CalendarWidget.svelte | 260 + .../src/lib/components/EditorPanel.svelte | 339 ++ Journal.App/src/lib/components/Navbar.svelte | 183 + .../src/lib/components/SidePanel.svelte | 1278 ++++ .../components/editor/FragmentEditor.svelte | 406 ++ .../lib/components/editor/ListEditor.svelte | 278 + .../components/editor/MarkdownEditor.svelte | 575 ++ .../components/editor/MarkdownToolbar.svelte | 236 + .../lib/components/editor/TodoEditor.svelte | 306 + Journal.App/src/lib/runtime/invoke.ts | 150 + Journal.App/src/lib/stores/entries.ts | 185 + Journal.App/src/lib/stores/fragments.ts | 215 + Journal.App/src/lib/stores/lists.ts | 118 + Journal.App/src/lib/stores/session.ts | 34 + Journal.App/src/lib/stores/settings.ts | 160 + Journal.App/src/lib/stores/todos.ts | 267 + Journal.App/src/lib/utils/markdown.ts | 119 + Journal.App/src/routes/+layout.svelte | 72 + Journal.App/src/routes/+layout.ts | 5 + Journal.App/src/routes/+page.svelte | 575 ++ Journal.App/src/routes/settings/+page.svelte | 675 +++ Journal.App/static/favicon.png | Bin 0 -> 1571 bytes Journal.App/static/style.css | 98 + Journal.App/static/svelte.svg | 1 + Journal.App/static/tauri.svg | 6 + Journal.App/static/vite.svg | 1 + Journal.App/svelte.config.js | 18 + Journal.App/tsconfig.json | 19 + Journal.App/vite.config.js | 32 + Journal.Core/Dtos/AiDtos.cs | 7 + Journal.Core/Dtos/CommandDtos.cs | 41 + Journal.Core/Dtos/DatabaseDtos.cs | 18 + Journal.Core/Dtos/EntrySearchDtos.cs | 16 + Journal.Core/Dtos/FragmentDtos.cs | 24 + Journal.Core/Dtos/JournalEntryDtos.cs | 12 + Journal.Core/Dtos/ListDtos.cs | 21 + Journal.Core/Dtos/SpeechDtos.cs | 21 + Journal.Core/Dtos/TodoDtos.cs | 38 + Journal.Core/Entry.cs | 494 ++ Journal.Core/Journal.Core.csproj | 15 + Journal.Core/Models/Command.cs | 13 + Journal.Core/Models/Fragment.cs | 42 + Journal.Core/Models/JournalConfig.cs | 29 + Journal.Core/Models/JournalEntry.cs | 98 + Journal.Core/Models/ListDocument.cs | 40 + Journal.Core/Models/ParsedSection.cs | 21 + Journal.Core/Models/SectionTitles.cs | 20 + Journal.Core/Models/TodoItem.cs | 44 + Journal.Core/Models/TodoList.cs | 34 + .../Repositories/DiskEntryFileRepository.cs | 35 + .../Repositories/IEntryFileRepository.cs | 15 + .../Repositories/IFragmentRepository.cs | 15 + Journal.Core/Repositories/IListRepository.cs | 12 + Journal.Core/Repositories/ITodoRepository.cs | 18 + .../InMemoryFragmentRepository.cs | 125 + .../Repositories/SqliteFragmentRepository.cs | 310 + .../Repositories/SqliteListRepository.cs | 129 + .../Repositories/SqliteTodoRepository.cs | 279 + Journal.Core/ServiceCollectionExtensions.cs | 71 + Journal.Core/Services/Ai/DisabledAiService.cs | 25 + Journal.Core/Services/Ai/IAiService.cs | 12 + .../Services/Ai/PythonSidecarAiService.cs | 86 + .../Services/Config/IJournalConfigService.cs | 8 + .../Services/Config/JournalConfigService.cs | 108 + .../Database/DatabaseSessionService.cs | 87 + .../Database/IDatabaseSessionService.cs | 12 + .../Database/IJournalDatabaseService.cs | 17 + .../Database/JournalDatabaseService.cs | 260 + .../Services/Entries/EntryFileNaming.cs | 9 + .../Services/Entries/EntryFileService.cs | 170 + .../Services/Entries/EntrySearchService.cs | 111 + .../Services/Entries/HtmlSanitizer.cs | 81 + .../Services/Entries/IEntryFileService.cs | 15 + .../Services/Entries/IEntrySearchService.cs | 8 + .../Services/Entries/JournalEntryDtoMapper.cs | 32 + .../Services/Entries/JournalParser.cs | 175 + .../Services/Fragments/FragmentService.cs | 81 + .../Services/Fragments/IFragmentService.cs | 15 + Journal.Core/Services/Lists/IListService.cs | 12 + Journal.Core/Services/Lists/ListService.cs | 54 + .../Services/Logging/CommandLogger.cs | 73 + Journal.Core/Services/Logging/LogRedactor.cs | 73 + .../Services/Sidecar/PythonSidecarClient.cs | 114 + Journal.Core/Services/Sidecar/SidecarCli.cs | 385 ++ .../Speech/DisabledSpeechBridgeService.cs | 26 + .../Services/Speech/ISpeechBridgeService.cs | 9 + .../Speech/PythonSidecarSpeechService.cs | 81 + Journal.Core/Services/Todos/ITodoService.cs | 16 + Journal.Core/Services/Todos/TodoService.cs | 91 + .../Services/Vault/IVaultCryptoService.cs | 8 + .../Services/Vault/IVaultStorageService.cs | 10 + .../Services/Vault/VaultCryptoService.cs | 83 + .../Services/Vault/VaultStorageService.cs | 386 ++ Journal.DevTool/Config/ConfigLoader.cs | 44 + Journal.DevTool/Config/DevToolConfig.cs | 86 + Journal.DevTool/Config/WorkspaceConfig.cs | 19 + Journal.DevTool/Config/WorkspaceLoader.cs | 52 + Journal.DevTool/Journal.DevTool.csproj | 17 + Journal.DevTool/Program.cs | 57 + Journal.DevTool/README.md | 234 + Journal.DevTool/Runner/ProcessRunner.cs | 60 + Journal.DevTool/Runner/TargetRunner.cs | 41 + Journal.DevTool/Tui/App.cs | 303 + Journal.DevTool/Tui/Theme.cs | 54 + Journal.DevTool/Tui/ToolchainScreen.cs | 313 + Journal.DevTool/Tui/WorkspaceScreen.cs | 101 + Journal.Sidecar/App.cs | 13 + Journal.Sidecar/Journal.Sidecar.csproj | 18 + .../Fixtures/transport_cases.json | 50 + Journal.SmokeTests/GlobalUsings.cs | 19 + Journal.SmokeTests/Journal.SmokeTests.csproj | 20 + Journal.SmokeTests/Program.AiSpeechTests.cs | 342 ++ .../Program.DatabaseConfigTests.cs | 249 + Journal.SmokeTests/Program.EntryTests.cs | 657 ++ Journal.SmokeTests/Program.FragmentTests.cs | 232 + Journal.SmokeTests/Program.ParserTests.cs | 153 + Journal.SmokeTests/Program.Shared.cs | 169 + Journal.SmokeTests/Program.TransportTests.cs | 48 + Journal.SmokeTests/Program.VaultTests.cs | 576 ++ Journal.SmokeTests/Program.cs | 103 + Journal.WebGateway/Journal.WebGateway.csproj | 13 + Journal.WebGateway/Program.cs | 262 + Journal.slnx | 7 + README.md | 538 ++ devtool.json | 335 + docs/frontend-csharp-backend-wiring.md | 218 + justfile | 105 + package-lock.json | 6 + scripts/README.md | 328 + scripts/WORKFLOWS.md | 140 + scripts/dev-shell.ps1 | 24 + scripts/dotnet-min.ps1 | 62 + scripts/migration-gate.ps1 | 57 + scripts/npm-clean.ps1 | 62 + scripts/nuget-export-cache.ps1 | 57 + scripts/nuget-import-cache.ps1 | 25 + scripts/pip-min.ps1 | 56 + scripts/pip_safe.py | 46 + scripts/publish-app.ps1 | 216 + scripts/publish-output.ps1 | 103 + scripts/publish-sidecar.ps1 | 54 + scripts/publish-webgateway.ps1 | 55 + scripts/run-webgateway.ps1 | 48 + scripts/script-common.ps1 | 240 + sdt-workspace.json | 10 + 186 files changed, 27441 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 Journal.App/.gitignore create mode 100644 Journal.App/README.md create mode 100644 Journal.App/package-lock.json create mode 100644 Journal.App/package.json create mode 100644 Journal.App/src-tauri/.gitignore create mode 100644 Journal.App/src-tauri/Cargo.lock create mode 100644 Journal.App/src-tauri/Cargo.toml create mode 100644 Journal.App/src-tauri/build.rs create mode 100644 Journal.App/src-tauri/capabilities/default.json create mode 100644 Journal.App/src-tauri/icons/128x128.png create mode 100644 Journal.App/src-tauri/icons/128x128@2x.png create mode 100644 Journal.App/src-tauri/icons/32x32.png create mode 100644 Journal.App/src-tauri/icons/Square107x107Logo.png create mode 100644 Journal.App/src-tauri/icons/Square142x142Logo.png create mode 100644 Journal.App/src-tauri/icons/Square150x150Logo.png create mode 100644 Journal.App/src-tauri/icons/Square284x284Logo.png create mode 100644 Journal.App/src-tauri/icons/Square30x30Logo.png create mode 100644 Journal.App/src-tauri/icons/Square310x310Logo.png create mode 100644 Journal.App/src-tauri/icons/Square44x44Logo.png create mode 100644 Journal.App/src-tauri/icons/Square71x71Logo.png create mode 100644 Journal.App/src-tauri/icons/Square89x89Logo.png create mode 100644 Journal.App/src-tauri/icons/StoreLogo.png create mode 100644 Journal.App/src-tauri/icons/icon.icns create mode 100644 Journal.App/src-tauri/icons/icon.ico create mode 100644 Journal.App/src-tauri/icons/icon.png create mode 100644 Journal.App/src-tauri/src/lib.rs create mode 100644 Journal.App/src-tauri/src/main.rs create mode 100644 Journal.App/src-tauri/tauri.conf.json create mode 100644 Journal.App/src/app.html create mode 100644 Journal.App/src/lib/backend/auth.ts create mode 100644 Journal.App/src/lib/backend/client.ts create mode 100644 Journal.App/src/lib/backend/entries.ts create mode 100644 Journal.App/src/lib/backend/fragments.ts create mode 100644 Journal.App/src/lib/backend/lists.ts create mode 100644 Journal.App/src/lib/backend/normalize.ts create mode 100644 Journal.App/src/lib/backend/templates.ts create mode 100644 Journal.App/src/lib/backend/todos.ts create mode 100644 Journal.App/src/lib/backend/types.ts create mode 100644 Journal.App/src/lib/components/AppModal.svelte create mode 100644 Journal.App/src/lib/components/CalendarWidget.svelte create mode 100644 Journal.App/src/lib/components/EditorPanel.svelte create mode 100644 Journal.App/src/lib/components/Navbar.svelte create mode 100644 Journal.App/src/lib/components/SidePanel.svelte create mode 100644 Journal.App/src/lib/components/editor/FragmentEditor.svelte create mode 100644 Journal.App/src/lib/components/editor/ListEditor.svelte create mode 100644 Journal.App/src/lib/components/editor/MarkdownEditor.svelte create mode 100644 Journal.App/src/lib/components/editor/MarkdownToolbar.svelte create mode 100644 Journal.App/src/lib/components/editor/TodoEditor.svelte create mode 100644 Journal.App/src/lib/runtime/invoke.ts create mode 100644 Journal.App/src/lib/stores/entries.ts create mode 100644 Journal.App/src/lib/stores/fragments.ts create mode 100644 Journal.App/src/lib/stores/lists.ts create mode 100644 Journal.App/src/lib/stores/session.ts create mode 100644 Journal.App/src/lib/stores/settings.ts create mode 100644 Journal.App/src/lib/stores/todos.ts create mode 100644 Journal.App/src/lib/utils/markdown.ts create mode 100644 Journal.App/src/routes/+layout.svelte create mode 100644 Journal.App/src/routes/+layout.ts create mode 100644 Journal.App/src/routes/+page.svelte create mode 100644 Journal.App/src/routes/settings/+page.svelte create mode 100644 Journal.App/static/favicon.png create mode 100644 Journal.App/static/style.css create mode 100644 Journal.App/static/svelte.svg create mode 100644 Journal.App/static/tauri.svg create mode 100644 Journal.App/static/vite.svg create mode 100644 Journal.App/svelte.config.js create mode 100644 Journal.App/tsconfig.json create mode 100644 Journal.App/vite.config.js create mode 100644 Journal.Core/Dtos/AiDtos.cs create mode 100644 Journal.Core/Dtos/CommandDtos.cs create mode 100644 Journal.Core/Dtos/DatabaseDtos.cs create mode 100644 Journal.Core/Dtos/EntrySearchDtos.cs create mode 100644 Journal.Core/Dtos/FragmentDtos.cs create mode 100644 Journal.Core/Dtos/JournalEntryDtos.cs create mode 100644 Journal.Core/Dtos/ListDtos.cs create mode 100644 Journal.Core/Dtos/SpeechDtos.cs create mode 100644 Journal.Core/Dtos/TodoDtos.cs create mode 100644 Journal.Core/Entry.cs create mode 100644 Journal.Core/Journal.Core.csproj create mode 100644 Journal.Core/Models/Command.cs create mode 100644 Journal.Core/Models/Fragment.cs create mode 100644 Journal.Core/Models/JournalConfig.cs create mode 100644 Journal.Core/Models/JournalEntry.cs create mode 100644 Journal.Core/Models/ListDocument.cs create mode 100644 Journal.Core/Models/ParsedSection.cs create mode 100644 Journal.Core/Models/SectionTitles.cs create mode 100644 Journal.Core/Models/TodoItem.cs create mode 100644 Journal.Core/Models/TodoList.cs create mode 100644 Journal.Core/Repositories/DiskEntryFileRepository.cs create mode 100644 Journal.Core/Repositories/IEntryFileRepository.cs create mode 100644 Journal.Core/Repositories/IFragmentRepository.cs create mode 100644 Journal.Core/Repositories/IListRepository.cs create mode 100644 Journal.Core/Repositories/ITodoRepository.cs create mode 100644 Journal.Core/Repositories/InMemoryFragmentRepository.cs create mode 100644 Journal.Core/Repositories/SqliteFragmentRepository.cs create mode 100644 Journal.Core/Repositories/SqliteListRepository.cs create mode 100644 Journal.Core/Repositories/SqliteTodoRepository.cs create mode 100644 Journal.Core/ServiceCollectionExtensions.cs create mode 100644 Journal.Core/Services/Ai/DisabledAiService.cs create mode 100644 Journal.Core/Services/Ai/IAiService.cs create mode 100644 Journal.Core/Services/Ai/PythonSidecarAiService.cs create mode 100644 Journal.Core/Services/Config/IJournalConfigService.cs create mode 100644 Journal.Core/Services/Config/JournalConfigService.cs create mode 100644 Journal.Core/Services/Database/DatabaseSessionService.cs create mode 100644 Journal.Core/Services/Database/IDatabaseSessionService.cs create mode 100644 Journal.Core/Services/Database/IJournalDatabaseService.cs create mode 100644 Journal.Core/Services/Database/JournalDatabaseService.cs create mode 100644 Journal.Core/Services/Entries/EntryFileNaming.cs create mode 100644 Journal.Core/Services/Entries/EntryFileService.cs create mode 100644 Journal.Core/Services/Entries/EntrySearchService.cs create mode 100644 Journal.Core/Services/Entries/HtmlSanitizer.cs create mode 100644 Journal.Core/Services/Entries/IEntryFileService.cs create mode 100644 Journal.Core/Services/Entries/IEntrySearchService.cs create mode 100644 Journal.Core/Services/Entries/JournalEntryDtoMapper.cs create mode 100644 Journal.Core/Services/Entries/JournalParser.cs create mode 100644 Journal.Core/Services/Fragments/FragmentService.cs create mode 100644 Journal.Core/Services/Fragments/IFragmentService.cs create mode 100644 Journal.Core/Services/Lists/IListService.cs create mode 100644 Journal.Core/Services/Lists/ListService.cs create mode 100644 Journal.Core/Services/Logging/CommandLogger.cs create mode 100644 Journal.Core/Services/Logging/LogRedactor.cs create mode 100644 Journal.Core/Services/Sidecar/PythonSidecarClient.cs create mode 100644 Journal.Core/Services/Sidecar/SidecarCli.cs create mode 100644 Journal.Core/Services/Speech/DisabledSpeechBridgeService.cs create mode 100644 Journal.Core/Services/Speech/ISpeechBridgeService.cs create mode 100644 Journal.Core/Services/Speech/PythonSidecarSpeechService.cs create mode 100644 Journal.Core/Services/Todos/ITodoService.cs create mode 100644 Journal.Core/Services/Todos/TodoService.cs create mode 100644 Journal.Core/Services/Vault/IVaultCryptoService.cs create mode 100644 Journal.Core/Services/Vault/IVaultStorageService.cs create mode 100644 Journal.Core/Services/Vault/VaultCryptoService.cs create mode 100644 Journal.Core/Services/Vault/VaultStorageService.cs create mode 100644 Journal.DevTool/Config/ConfigLoader.cs create mode 100644 Journal.DevTool/Config/DevToolConfig.cs create mode 100644 Journal.DevTool/Config/WorkspaceConfig.cs create mode 100644 Journal.DevTool/Config/WorkspaceLoader.cs create mode 100644 Journal.DevTool/Journal.DevTool.csproj create mode 100644 Journal.DevTool/Program.cs create mode 100644 Journal.DevTool/README.md create mode 100644 Journal.DevTool/Runner/ProcessRunner.cs create mode 100644 Journal.DevTool/Runner/TargetRunner.cs create mode 100644 Journal.DevTool/Tui/App.cs create mode 100644 Journal.DevTool/Tui/Theme.cs create mode 100644 Journal.DevTool/Tui/ToolchainScreen.cs create mode 100644 Journal.DevTool/Tui/WorkspaceScreen.cs create mode 100644 Journal.Sidecar/App.cs create mode 100644 Journal.Sidecar/Journal.Sidecar.csproj create mode 100644 Journal.SmokeTests/Fixtures/transport_cases.json create mode 100644 Journal.SmokeTests/GlobalUsings.cs create mode 100644 Journal.SmokeTests/Journal.SmokeTests.csproj create mode 100644 Journal.SmokeTests/Program.AiSpeechTests.cs create mode 100644 Journal.SmokeTests/Program.DatabaseConfigTests.cs create mode 100644 Journal.SmokeTests/Program.EntryTests.cs create mode 100644 Journal.SmokeTests/Program.FragmentTests.cs create mode 100644 Journal.SmokeTests/Program.ParserTests.cs create mode 100644 Journal.SmokeTests/Program.Shared.cs create mode 100644 Journal.SmokeTests/Program.TransportTests.cs create mode 100644 Journal.SmokeTests/Program.VaultTests.cs create mode 100644 Journal.SmokeTests/Program.cs create mode 100644 Journal.WebGateway/Journal.WebGateway.csproj create mode 100644 Journal.WebGateway/Program.cs create mode 100644 Journal.slnx create mode 100644 README.md create mode 100644 devtool.json create mode 100644 docs/frontend-csharp-backend-wiring.md create mode 100644 justfile create mode 100644 package-lock.json create mode 100644 scripts/README.md create mode 100644 scripts/WORKFLOWS.md create mode 100644 scripts/dev-shell.ps1 create mode 100644 scripts/dotnet-min.ps1 create mode 100644 scripts/migration-gate.ps1 create mode 100644 scripts/npm-clean.ps1 create mode 100644 scripts/nuget-export-cache.ps1 create mode 100644 scripts/nuget-import-cache.ps1 create mode 100644 scripts/pip-min.ps1 create mode 100644 scripts/pip_safe.py create mode 100644 scripts/publish-app.ps1 create mode 100644 scripts/publish-output.ps1 create mode 100644 scripts/publish-sidecar.ps1 create mode 100644 scripts/publish-webgateway.ps1 create mode 100644 scripts/run-webgateway.ps1 create mode 100644 scripts/script-common.ps1 create mode 100644 sdt-workspace.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..960e0be --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +[*.cs] +# Prefer expression body for single-line constructors/methods/properties +csharp_style_expression_bodied_constructors = when_on_single_line:suggestion +csharp_style_expression_bodied_methods = when_on_single_line:suggestion +csharp_style_expression_bodied_properties = true:suggestion \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f9e8871 --- /dev/null +++ b/.gitignore @@ -0,0 +1,52 @@ +# Build output +bin/ +obj/ + +# Visual Studio +.vs/ +*.user +*.suo +*.userosscache +*.sln.docstates + +# Rider +.idea/ +*.sln.iml + +# VS Code +.vscode/ + +# NuGet +*.nupkg +**/packages/ +project.lock.json +project.fragment.lock.json +.nuget/ +.dotnet_home/ +.journal-sidecar/ +.tmp +.npm +output/ + +# Publish output +publish/ + +# User secrets +secrets.json + +# Windows +Thumbs.db +desktop.ini + +# Runtime journal data (created by sidecar at repo root) +journal/ +logs/ + +# macOS +.DS_Store + +# OTHER +.just/ +journalapp.exe +Journal.App/node_modules.old/@rollup/.rollup-win32-x64-msvc-IjiZshxL/rollup.win32-x64-msvc.node +journalapp(1).exe diff --git a/Journal.App/.gitignore b/Journal.App/.gitignore new file mode 100644 index 0000000..6635cf5 --- /dev/null +++ b/Journal.App/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/Journal.App/README.md b/Journal.App/README.md new file mode 100644 index 0000000..d5f55d0 --- /dev/null +++ b/Journal.App/README.md @@ -0,0 +1,77 @@ +# Journal.App + +SvelteKit 5 + Tauri 2 desktop application for Project Journal. + +## Tech Stack + +- **Frontend**: SvelteKit 5, TypeScript, Vite 6 +- **Tauri shell**: Rust (Tauri 2), `tokio` async runtime +- **Backend bridge**: `Journal.Sidecar.exe` managed as a persistent long-lived child process + +## Dev Setup + +```powershell +npm install +npm run dev # SvelteKit dev server at http://localhost:1420 +npm run tauri dev # Tauri desktop window (connects to dev server) +``` + +## Build Targets + +| Command | Output | Use case | +|---------|--------|----------| +| `npm run build` | `Journal.App/build/` | Web bundle for `Journal.WebGateway` | +| `.\scripts\publish-app.ps1 -Target web` | `Journal.App/build/` | Same, via script | +| `.\scripts\publish-app.ps1 -Target tauri -TauriBundles none` | `src-tauri/target/release/journalapp.exe` | Raw desktop exe | +| `.\scripts\publish-app.ps1 -Target tauri -TauriBundles nsis` | NSIS installer | Packaged installer | + +## Frontend State Management + +Svelte stores are the source of truth for all feature state. + +### Current Stores + +| Store file | State exports | Notes | +|-----------|---------------|-------| +| `src/lib/stores/entries.ts` | `entriesStore` | Entry list, `getDefaultEntry`, `createEntryDraft` | +| `src/lib/stores/fragments.ts` | `fragmentsStore` | Fragment CRUD + parse/serialize helpers | +| `src/lib/stores/todos.ts` | `todoListsStore`, `todosStore` | Todo list and item CRUD | +| `src/lib/stores/lists.ts` | `listsStore` | Generic list CRUD, `createListDraft` | +| `src/lib/stores/settings.ts` | `settingsTags`, `settingsFragmentTypes` | Tag/type config | + +### Store-First Rule + +- Components call **store helper functions** for CRUD operations — not inline mutations. +- Components should focus on rendering, local form state, and invoking store operations. +- Backend calls (`sendCommand`) belong inside store/service helpers, not components. + +## Tauri Commands (Rust → Frontend) + +| Command | Description | +|---------|-------------| +| `sidecar_command` | Forward a `CommandEnvelope` to `Journal.Sidecar` stdin/stdout and return parsed JSON | +| `get_sidecar_root` | Get currently resolved sidecar root path | +| `set_sidecar_root` | Override root path (saved to `settings.json`, restarts sidecar) | +| `get_ui_settings` | Load tag/fragment-type settings | +| `set_ui_settings` | Persist tag/fragment-type settings | +| `shutdown` | Stop sidecar, exit app | + +## Sidecar Path Resolution + +The Rust shell looks for `Journal.Sidecar.exe` starting from the auto-detected repository root: + +1. `/Journal.Sidecar.exe` +2. `/publish/Journal.Sidecar.exe` +3. `/Journal.Sidecar/bin/Debug/net10.0/Journal.Sidecar.exe` +4. `/Journal.Sidecar/bin/Release/net10.0/win-x64/publish/Journal.Sidecar.exe` +5. Recursive scan of `/Journal.Sidecar/` + +Build the sidecar before running the Tauri app: + +```powershell +.\scripts\publish-sidecar.ps1 -Configuration Release -Runtime win-x64 +``` + +## Recommended IDE Setup + +[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) diff --git a/Journal.App/package-lock.json b/Journal.App/package-lock.json new file mode 100644 index 0000000..c9c5ff0 --- /dev/null +++ b/Journal.App/package-lock.json @@ -0,0 +1,1886 @@ +{ + "name": "journalapp", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "journalapp", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@tauri-apps/api": "^2", + "@tauri-apps/plugin-dialog": "^2.6.0", + "@tauri-apps/plugin-opener": "^2" + }, + "devDependencies": { + "@sveltejs/adapter-static": "^3.0.6", + "@sveltejs/kit": "^2.9.0", + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "@tauri-apps/cli": "^2", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "typescript": "~5.6.2", + "vite": "^6.0.3" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@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.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", + "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", + "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", + "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", + "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", + "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", + "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", + "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", + "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", + "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", + "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", + "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", + "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", + "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", + "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", + "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", + "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", + "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", + "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", + "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", + "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", + "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", + "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", + "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", + "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.9", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.9.tgz", + "integrity": "sha512-lVJX6qEgs/4DOcRTpo56tmKzVPtoWAaVbL4hfO7t7NVwl9AAXzQR6cihesW1BmNMPl+bK6dreu2sOKBP2Q9CIA==", + "dev": true, + "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.53.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.53.1.tgz", + "integrity": "sha512-NXsZLvalgI3HrHG6ogoEVzjyV7bSFQNqQeekfU7nNufQFrRyV3EBDfQKEwxx50peu7spZR42JuC1PFhwxuvBrg==", + "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.3", + "esm-env": "^1.2.2", + "kleur": "^4.1.5", + "magic-string": "^0.30.5", + "mrmime": "^2.0.0", + "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 || ^7.0.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 || ^8.0.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/@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/@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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "peer": true, + "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==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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/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/devalue": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.3.tgz", + "integrity": "sha512-nc7XjUU/2Lb+SvEFVGcWLiKkzfw8+qHI7zn8WYXKkLMgfGSHbgCEaR6bJpev8Cm6Rmrb19Gfd/tZvGqx9is3wg==", + "dev": true, + "license": "MIT" + }, + "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/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/esrap": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.3.tgz", + "integrity": "sha512-8fOS+GIGCQZl/ZIlhl59htOlms6U8NvX6ZYgYHpRU/b6tVSh3uHkOHZikl3D4cMbYM0JlpBe+p/BkZEi8J9XIQ==", + "dev": true, + "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/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/is-reference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6" + } + }, + "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/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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/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", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "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.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", + "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", + "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.59.0", + "@rollup/rollup-android-arm64": "4.59.0", + "@rollup/rollup-darwin-arm64": "4.59.0", + "@rollup/rollup-darwin-x64": "4.59.0", + "@rollup/rollup-freebsd-arm64": "4.59.0", + "@rollup/rollup-freebsd-x64": "4.59.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", + "@rollup/rollup-linux-arm-musleabihf": "4.59.0", + "@rollup/rollup-linux-arm64-gnu": "4.59.0", + "@rollup/rollup-linux-arm64-musl": "4.59.0", + "@rollup/rollup-linux-loong64-gnu": "4.59.0", + "@rollup/rollup-linux-loong64-musl": "4.59.0", + "@rollup/rollup-linux-ppc64-gnu": "4.59.0", + "@rollup/rollup-linux-ppc64-musl": "4.59.0", + "@rollup/rollup-linux-riscv64-gnu": "4.59.0", + "@rollup/rollup-linux-riscv64-musl": "4.59.0", + "@rollup/rollup-linux-s390x-gnu": "4.59.0", + "@rollup/rollup-linux-x64-gnu": "4.59.0", + "@rollup/rollup-linux-x64-musl": "4.59.0", + "@rollup/rollup-openbsd-x64": "4.59.0", + "@rollup/rollup-openharmony-arm64": "4.59.0", + "@rollup/rollup-win32-arm64-msvc": "4.59.0", + "@rollup/rollup-win32-ia32-msvc": "4.59.0", + "@rollup/rollup-win32-x64-gnu": "4.59.0", + "@rollup/rollup-win32-x64-msvc": "4.59.0", + "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/svelte": { + "version": "5.53.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.53.3.tgz", + "integrity": "sha512-pRUBr6j6uQDgBi208gHnGRMykw0Rf2Yr1HmLyRucsvcaYgIUxswJkT93WZJflsmezu5s8Lq+q78EoyLv2yaFCg==", + "dev": true, + "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", + "@types/trusted-types": "^2.0.7", + "acorn": "^8.12.1", + "aria-query": "5.3.1", + "axobject-query": "^4.1.0", + "clsx": "^2.1.1", + "devalue": "^5.6.3", + "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.4.3", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.4.3.tgz", + "integrity": "sha512-4HtdEv2hOoLCEsSXI+RDELk9okP/4sImWa7X02OjMFFOWeSdFF3NFy3vqpw0z+eH9C88J9vxZfUXz/Uv2A1ANw==", + "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/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/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.2", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.2.tgz", + "integrity": "sha512-zpKATdUbzbsycPFBN71nS2uzBUQiVnFoOrr2rvqv34S1lcAgMKKkjWleLGeiJlZ8lwCXvtWaRn7R3ZC16SYRuw==", + "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-beta.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/zimmerframe": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.4.tgz", + "integrity": "sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/Journal.App/package.json b/Journal.App/package.json new file mode 100644 index 0000000..bdca238 --- /dev/null +++ b/Journal.App/package.json @@ -0,0 +1,30 @@ +{ + "name": "journalapp", + "version": "0.1.0", + "description": "", + "type": "module", + "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", + "tauri": "tauri" + }, + "license": "MIT", + "dependencies": { + "@tauri-apps/api": "^2", + "@tauri-apps/plugin-dialog": "^2.6.0", + "@tauri-apps/plugin-opener": "^2" + }, + "devDependencies": { + "@sveltejs/adapter-static": "^3.0.6", + "@sveltejs/kit": "^2.9.0", + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "@tauri-apps/cli": "^2", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "typescript": "~5.6.2", + "vite": "^6.0.3" + } +} diff --git a/Journal.App/src-tauri/.gitignore b/Journal.App/src-tauri/.gitignore new file mode 100644 index 0000000..b21bd68 --- /dev/null +++ b/Journal.App/src-tauri/.gitignore @@ -0,0 +1,7 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ + +# Generated by Tauri +# will have schema files for capabilities auto-completion +/gen/schemas diff --git a/Journal.App/src-tauri/Cargo.lock b/Journal.App/src-tauri/Cargo.lock new file mode 100644 index 0000000..2191152 --- /dev/null +++ b/Journal.App/src-tauri/Cargo.lock @@ -0,0 +1,5375 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "async-signal" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "brotli" +version = "8.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.11.0", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.18", +] + +[[package]] +name = "cargo_toml" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" +dependencies = [ + "serde", + "toml 0.9.12+spec-1.1.0", +] + +[[package]] +name = "cc" +version = "1.2.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link 0.2.1", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" +dependencies = [ + "bitflags 2.11.0", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.11.0", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cssparser" +version = "0.29.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "matches", + "phf 0.10.1", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "ctor" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.117", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", + "serde_core", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.117", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.11.0", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "embed-resource" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55a075fc573c64510038d7ee9abc7990635863992f83ebc52c8b433b8411a02e" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 0.9.12+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[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-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", + "wasip3", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.11.0", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "html5ever" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" +dependencies = [ + "log", + "mac", + "markup5ever", + "match_token", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" +dependencies = [ + "byteorder", + "png", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "journalapp" +version = "0.1.0" +dependencies = [ + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-dialog", + "tauri-plugin-opener", + "tokio", +] + +[[package]] +name = "js-sys" +version = "0.3.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dc6f6450b3f6d4ed5b16327f38fed626d375a886159ca555bd7822c0c3a5a6" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonptr" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.11.0", + "serde", + "unicode-segmentation", +] + +[[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" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.182" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libredox" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" +dependencies = [ + "bitflags 2.11.0", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "markup5ever" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18" +dependencies = [ + "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.117", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", +] + +[[package]] +name = "muda" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c1738382f66ed56b3b9c8119e794a2e23148ac8ea214eda86622d4cb9d415a" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.18", + "windows-sys 0.60.2", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.11.0", + "jni-sys", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "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", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "num-conv" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +dependencies = [ + "proc-macro-crate 3.4.0", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.11.0", + "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]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.11.0", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "bitflags 2.11.0", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.11.0", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.11.0", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.11.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.11.0", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-io-surface", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.11.0", + "block2", + "libc", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.11.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 = [ + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.11.0", + "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.11.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.11.0", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.11.0", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-javascript-core", + "objc2-security", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "open" +version = "5.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43bb73a7fa3799b198970490a51174027ba0d4ec504b03cd08caf513d40024bc" +dependencies = [ + "dunce", + "is-wsl", + "libc", + "pathdiff", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "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 = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +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", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand 0.8.5", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +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", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +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", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "plist" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" +dependencies = [ + "base64 0.22.1", + "indexmap 2.13.0", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +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.117", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit 0.23.10+spec-1.0.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[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", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.11.0", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 2.0.18", +] + +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "reqwest" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rfd" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" +dependencies = [ + "block2", + "dispatch2", + "glib-sys", + "gobject-sys", + "gtk-sys", + "js-sys", + "log", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.11.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.117", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" +dependencies = [ + "bitflags 1.3.2", + "cssparser", + "derive_more", + "fxhash", + "log", + "phf 0.8.0", + "phf_codegen 0.8.0", + "precomputed-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_with" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.13.0", + "schemars 0.9.0", + "schemars 1.2.1", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "servo_arc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" +dependencies = [ + "nodrop", + "stable_deref_trait", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" + +[[package]] +name = "slab" +version = "0.4.12" +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" + +[[package]] +name = "socket2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.11.3", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "swift-rs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.2", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.34.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a753bdc39c07b192151523a3f77cd0394aa75413802c883a0f6f6a0e5ee2e7" +dependencies = [ + "bitflags 2.11.0", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dispatch", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "lazy_static", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "parking_lot", + "raw-window-handle", + "scopeguard", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463ae8677aa6d0f063a900b9c41ecd4ac2b7ca82f0b058cc4491540e55b20129" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.18", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca7bd893329425df750813e95bd2b643d5369d929438da96d5bbb7cc2c918f74" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "toml 0.9.12+spec-1.1.0", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac423e5859d9f9ccdd32e3cf6a5866a15bedbf25aa6630bcb2acde9468f6ae3" +dependencies = [ + "base64 0.22.1", + "brotli", + "ico", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.117", + "tauri-utils", + "thiserror 2.0.18", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6a1bd2861ff0c8766b1d38b32a6a410f6dc6532d4ef534c47cfb2236092f59" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692a77abd8b8773e107a42ec0e05b767b8d2b7ece76ab36c6c3947e34df9f53f" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "toml 0.9.12+spec-1.1.0", + "walkdir", +] + +[[package]] +name = "tauri-plugin-dialog" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9204b425d9be8d12aa60c2a83a289cf7d1caae40f57f336ed1155b3a5c0e359b" +dependencies = [ + "log", + "raw-window-handle", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror 2.0.18", + "url", +] + +[[package]] +name = "tauri-plugin-fs" +version = "2.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed390cc669f937afeb8b28032ce837bac8ea023d975a2e207375ec05afaf1804" +dependencies = [ + "anyhow", + "dunce", + "glob", + "percent-encoding", + "schemars 0.8.22", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "tauri-utils", + "thiserror 2.0.18", + "toml 0.9.12+spec-1.1.0", + "url", +] + +[[package]] +name = "tauri-plugin-opener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc624469b06f59f5a29f874bbc61a2ed737c0f9c23ef09855a292c389c42e83f" +dependencies = [ + "dunce", + "glob", + "objc2-app-kit", + "objc2-foundation", + "open", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.18", + "url", + "windows", + "zbus", +] + +[[package]] +name = "tauri-runtime" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b885ffeac82b00f1f6fd292b6e5aabfa7435d537cef57d11e38a489956535651" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.18", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5204682391625e867d16584fedc83fc292fb998814c9f7918605c789cd876314" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcd169fccdff05eff2c1033210b9b94acd07a47e6fa9a3431cf09cfd4f01c87e" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dunce", + "glob", + "html5ever", + "http", + "infer", + "json-patch", + "kuchikiki", + "log", + "memchr", + "phf 0.11.3", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.18", + "toml 0.9.12+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1087b111fe2b005e42dbdc1990fc18593234238d47453b0c99b7de1c9ab2c1e0" +dependencies = [ + "dunce", + "embed-resource", + "toml 0.9.12+spec-1.1.0", +] + +[[package]] +name = "tempfile" +version = "3.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0" +dependencies = [ + "fastrand", + "getrandom 0.4.1", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +dependencies = [ + "futf", + "mac", + "utf-8", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap 2.13.0", + "serde_core", + "serde_spanned 1.0.4", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.14", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.13.0", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.13.0", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap 2.13.0", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "winnow 0.7.14", +] + +[[package]] +name = "toml_parser" +version = "1.0.9+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +dependencies = [ + "winnow 0.7.14", +] + +[[package]] +name = "toml_writer" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags 2.11.0", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tray-icon" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e85aa143ceb072062fc4d6356c1b520a51d636e7bc8e77ec94be3608e5e80c" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.18", + "windows-sys 0.60.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "uds_windows" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset", + "tempfile", + "winapi", +] + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb" +dependencies = [ + "getrandom 0.4.1", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +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 = "wasm-bindgen" +version = "0.2.113" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60722a937f594b7fde9adb894d7c092fc1bb6612897c46368d18e7a20208eff2" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a89f4650b770e4521aa6573724e2aed4704372151bd0de9d16a3bbabb87441a" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.113" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac8c6395094b6b91c4af293f4c79371c163f9a6f56184d2c9a85f5a95f3950" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.113" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3fabce6159dc20728033842636887e4877688ae94382766e00b180abac9d60" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.117", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.113" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0e091bdb824da87dc01d967388880d017a0a9bc4f3bdc0d86ee9f9336e3bb5" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.0", + "hashbrown 0.15.5", + "indexmap 2.13.0", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705eceb4ce901230f8625bd1d665128056ccbe4b7408faa625eec1ba80f59a97" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webview2-com" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" +dependencies = [ + "thiserror 2.0.18", + "windows", + "windows-core 0.61.2", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.55.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + +[[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.117", + "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.117", + "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.11.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" +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", +] + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "wry" +version = "0.54.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb26159b420aa77684589a744ae9a9461a95395b848764ad12290a14d960a11a" +dependencies = [ + "base64 0.22.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dpi", + "dunce", + "gdkx11", + "gtk", + "html5ever", + "http", + "javascriptcore-rs", + "jni", + "kuchikiki", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.18", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca82f95dbd3943a40a53cfded6c2d0a2ca26192011846a1810c4256ef92c60bc" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 0.7.14", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222" +dependencies = [ + "proc-macro-crate 3.4.0", + "proc-macro2", + "quote", + "syn 2.0.117", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" +dependencies = [ + "serde", + "winnow 0.7.14", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.8.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[package]] +name = "zvariant" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5708299b21903bbe348e94729f22c49c55d04720a004aa350f1f9c122fd2540b" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 0.7.14", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c" +dependencies = [ + "proc-macro-crate 3.4.0", + "proc-macro2", + "quote", + "syn 2.0.117", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.117", + "winnow 0.7.14", +] diff --git a/Journal.App/src-tauri/Cargo.toml b/Journal.App/src-tauri/Cargo.toml new file mode 100644 index 0000000..ccc2244 --- /dev/null +++ b/Journal.App/src-tauri/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "journalapp" +version = "0.1.0" +description = "A Tauri App" +authors = ["Stan"] +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[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 +name = "journalapp_lib" +crate-type = ["staticlib", "cdylib", "rlib"] + +[build-dependencies] +tauri-build = { version = "2", features = [] } + +[dependencies] +tauri = { version = "2", features = [] } +tauri-plugin-dialog = "2" +tauri-plugin-opener = "2" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +tokio = { version = "1", features = ["process", "io-util", "sync"] } diff --git a/Journal.App/src-tauri/build.rs b/Journal.App/src-tauri/build.rs new file mode 100644 index 0000000..d860e1e --- /dev/null +++ b/Journal.App/src-tauri/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/Journal.App/src-tauri/capabilities/default.json b/Journal.App/src-tauri/capabilities/default.json new file mode 100644 index 0000000..01a4101 --- /dev/null +++ b/Journal.App/src-tauri/capabilities/default.json @@ -0,0 +1,11 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Capability for the main window", + "windows": ["main"], + "permissions": [ + "core:default", + "dialog:default", + "opener:default" + ] +} diff --git a/Journal.App/src-tauri/icons/128x128.png b/Journal.App/src-tauri/icons/128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..6be5e50e9b9ae84d9e2ee433f32ef446495eaf3b GIT binary patch literal 3512 zcmZu!WmMA*AN{X@5ssAZ4hg}RDK$z$WD|)8q(Kox0Y~SUfFLF9LkQ9xg5+pHkQyZj zDkY+HjTi%7-|z1|=iYmM_nvdV|6(x4dJME&v;Y7w80hPm{B_*_NJI5kd(|C={uqeDoRfwZhH52|yc%gW$KbRklqd;%n)9tb&?n%O# z$I0;L220R)^IP6y+es|?jxHrGen$?c~Bsw*Vxb3o8plQHeWI3rbjnBXp5pX9HqTWuO>G zRQ{}>rVd7UG#(iE9qW9^MqU@3<)pZ?zUHW{NsmJ3Q4JG-!^a+FH@N-?rrufSTz2kt zsgbV-mlAh#3rrU*1c$Q$Z`6#5MxevV3T81n(EysY$fPI=d~2yQytIX6UQcZ`_MJMH3pUWgl6li~-BSONf3r zlK536r=fc$;FlAxA5ip~O=kQ!Qh+@yRTggr$ElyB$t>1K#>Hh3%|m=#j@fIWxz~Oa zgy8sM9AKNAkAx&dl@8aS_MC^~#q@_$-@o%paDKBaJg)rmjzgGPbH+z?@%*~H z4Ii75`f~aOqqMxb_Jba7)!g1S=~t@5e>RJqC}WVq>IR^>tY_)GT-x_Hi8@jjRrZt% zs90pIfuTBs5ws%(&Bg^gO#XP^6!+?5EEHq;WE@r54GqKkGM0^mI(aNojm| zVG0S*Btj0xH4a^Wh8c?C&+Ox@d{$wqZ^64`j}ljEXJ0;$6#<9l77O|Of)T8#)>|}? z!eHacCT*gnqRm_0=_*z3T%RU}4R(J^q}+K>W49idR5qsz5BFnH>DY zoff)N<@8y)T8m(My#E^L{o;-3SAO(=sw7J4=+500{sYI8=`J5Rfc?52z#IMHj;)WGr>E}we@ zIeKIKWvt9mLppaRtRNDP^*{VOO>LEQS6poJ4e5#Tt_kpo9^o<^zeimWaxvv^KHW!f zk-MMgwmgEVmij6UvM$Jz%~(=A+NO*@yOJ(%+v>uPzvg-~P(3wM4dJ;e7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9*TvxNFe*Xxg-Z*yDEtdWDcQj z{Lb9MmQK4Ft@O|b+YA`O`&Pe$a#GSp;Dw9Fe|%u=J5-mfb@{|if<_Acg8k(e{6C4@ zofnb45l7U^(=3rVrR$K*#FUddX9PGlZ&W#Jz#Mj7!d%Q?D!monnG zpGGcD6A8>TFlCIFBLr#9^GpjaAowCtrG%}|Aiev}^3Q0Fjs-otJx48Ojk(Lo4|jKYWN%L&b8)10oqmJ- zDdfZ9H4j8$-KzHX8B~9*gl81Lv<~`P=m0$Q`wnQah2Hy`6SQyBr|a%Vc*%#l1+H7p zK`ft1XTnFN@K%JON6q(oKLoToebQ!73}NPoOOPD8HDhulKZK8IT62XeGf}&=?=1E^O#oFET7Jh|AE2Zi)-}sSL>9 zrqJAD;{wTm-OFsgQ!GIX=ageM-Ys?lqoHJFU$=#E2@amhup;WPq(c6j&3t$r-FIjk ztL*!wn}n9o1%}fy&d^WQO`{@+;)3qYj9R`5H{fP!4J||Z{Qi~&iikTbs8+kM2I&bR zyf#uQVE^dXPF1Y5kDq+*)6~+pBvErhAH&MCoKaPoyTI@V_OK!y!zT~)p?Mkq(o&aB znadm7y3BXEYE)o;0w+-1<5Z9ov?1R>mMKr2EXIUk2$VLDZIh@ znDNHcu3>xDlnmK{6>I22t!KG}K{wv`F;gMnk(dsu-vTZ>GqQ!gZ;6%IVdt?S5O4fY z+=V6_-CV4w-~0EoYL}Ak{rxmD*n#HLm(d96<^~zrd*m?& z{eU|}-9A_P0mlszy18QVsHYY4NaqEuW2BO$B0$V20%aFf6bSVt(KaFw%oDy$8;R zu5RKuw1Z|tqO2W4{?BU#$?p{sTSG2KMkT>)MUj%O1<6T0=BW+L9lHRTHY6IWjM+-2}HP)%tvd8}yAzYEn literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/128x128@2x.png b/Journal.App/src-tauri/icons/128x128@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e81becee571e96f76aa5667f9324c05e5e7a4479 GIT binary patch literal 7012 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$xZF`T@vbM^c-@&|8vBlvL3QPRlylwtMbN~tC zAB|4~;ydT{3mF@p0@RUT^>1H*8rTKb9!CgqufH4#AkK2f364d=fX9D!{|=2_9yv$e z-c)s`Pd2G>L$@9&6E4pB1#?lyQijJk6&w2 Sh@|Ye~|0>}wMPLT8jm@Y!H33Sz}5aFI6 zM9Lzqz|;A*0sGs=2A1uU!1nk2dGF7knQwr99SAFen)x(eCO;F8y2C~0FD1YxRTPcy zPWVxkUYmeuz}Tv?7&Fe-!UE{)ZW)Mb;H)^#eHDv$`dkZGguJz@^MA!ZNGAUqt{|0H zpZ7Ch9S`q5!>R%}>}62!+(T^evyO+ImSo2wpu)su4^3nw5(%)KD%gbSev^*HZZ&3( z#&c@Z0gH|}Ck)w6fh0&NBJ62ib%R}(3@$VFl*_#l2W$wQ-~4RmZZAt5O*^2Q5}Xr8Hy@c`#pM?kc?hFWxRXr*mUfUCXf4ka5DD~ zat6d85COB05l#(P9*cQZ3EC8fVdS~?&vN#rce(aF9@xp80O2{{FBvU+{X>Hoh;xI` z{$e^Nw1y*VbO8wv`8|-m?NwNaKGTGaF{P^JLB^DbOYWIbn%eT`*!^C1H36=O8Z-M> zkD~88ry`eSo`tEBN4>w7OWZwUzlh{WM1m8R6zepqGcGMaV7vWY9b?K4b6~|HVG)ec wi>I@ws#sZo7or4_*4M>7;p5{nr2pZ?Uu4>Krr0kU)&Kwi07*qoM6N<$f)&@lf&c&j literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/Square107x107Logo.png b/Journal.App/src-tauri/icons/Square107x107Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0ca4f27198838968bd60ed7d371bfa23496b7fe5 GIT binary patch literal 2863 zcmV+~3()k5P)2T^I$?x zaYQg&pCHVGsw{hVJKeJjnTAPVzIJy&@2@ONDhmw*aGfYREZIehxXjQGW&);l}730_NI?Rf^MxPP7h0n@|X4 z$_NmLkmcX9a6<@;g%^uO5`jK11zHAwB&Be>EL;Ksu&`nkBH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YUfj}S-2m}IwKp+qZ1OkCTAkYy1 Y2S8W#vM)6=T>t<807*qoM6N<$f*y@n<^TWy literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/Square284x284Logo.png b/Journal.App/src-tauri/icons/Square284x284Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..c021d2ba76619c08969ab688db3b27f29257aa6f GIT binary patch literal 7737 zcmb7Jg;N_$u*XVqcP+HI6emcbcyWR@NGVP!4k_-z3$#Gd;10#zDFKRmiUxN{p*TSv z-<$Ujyqnp%x!>;X&duEJ-R?%~XsHn5(cz(?p%JRSQ`AL6LudGpaIl{c%5(g+rwP~f z9moR>4WIl!LPyJh(ma9a9=a;>XjS73`%eojJ2_1`G_=|T{5y+hXlRV%s)};@-ss1O zAa@3(l;gYa~ymye90dKS59Fwku9(LU>G1vDh#kqqfKB7Ky8nVrYb&}|9_83 zEDbdDq08Q%sF5SpM;UYGcpN(X5X>Ssi)nBWC>OHArgc8Y|GrRNzQ0ymSIAu|h{8Tsam*AnS*~~*OqgM5)8If;hAL>=_Pfq`6uWNlV}|&e z6;n-2uztv`H7MezYVL|oZ&SS{?0&_`h*9#)bpEGK?-h=m2UXP&uh;eB2~X(s3s<_) zD|@oQw>Npx0ODf4=2>HMAhB;-uwLaxz+ z9S8buXpXtMMcddByd;pXQT5Vug+RR==Y}mg>hd#*n3#Q0>n{D}iE*hbYbcvOR+{+r zqE`jhZ}~MvR_5SsSh4y?#3Wy>^T+55ZY(XV7(N$5dfvQ^kgjpTNtoccc;p$M3q;ej zE$~n}=bqphR=h(cwiHvHGD$m#f$Wal7l6&;n4xC4C}a0L#7d)} zSJ_(eVH=ClVf#^VoVjUJu;?GY*-p;=>Q&_356L^NQ|1h|)BEy$OkcBRxZ?#Vqke>b zD8PXWE1m@ysma72@W`*Pd@Fz`9i0=r@9QNB+G0k`WS;oofVpHgSv`$!+_5lzM{ShL zYY=YS-Iy`zh{8U@_dB+6@9?Pq z^`riq(LNmMtV||TDP0oQQw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YCzb*0*1V_Ye6wWqxuF=GmxfVawPHK#{_h;tFWJ~X`2S89W zvp1Ps%jtLpf|TRQICEE;1%G7)ohAZM0WC8VgdblxDwh?eVUxVw}76t9GqFL(>70QMHJ@ynsz4w;sAbCx} zp{y)z*%oaQjRMTylheaz;$uY~opI_vuW}wd((A{=jK@_OG23-7>^;{?Z(J^^UX`sk zoqldvTk!nl(MU@WCo2|0u(pP%bhR@>TUum}1I~7Iy^RCwlII(^DA{((V^Z;!2UzmNl z0{d+N8p6>;L}nA9y*ueT#yn{^Hoxv;IsN9y7eJ zG1Up=T(l;&uu`wUR1xL(L?fo6`*Yg^#L2>zn@@}A;doVTxHFCW?0-2UVB~Gv*^hd`R0WE!iN?g(#R=Ff-|X@sm2`78FBu!!UL_Ix-jjHM z)z6#d=bY&s-ow5e7ej=xOSqGb{Mm~AOEQGfnL{n{=ud*tW0MjICDu5Xy>L2+Nn}UI zbkwxlHnB*&1`gwQm1=f`O8uWV(6K6+6<(aGJh)K>m;@B{ z=vT%fd&+QbrAnr~MoPfvpB6Dg^lDp!j(CAP+T2$-(gC(}q7ZRXk>ju)+`@~o?R;A4 z*1N-ibNfa7ryd0{)4}8LKfg>Kuh`0I z0R$mdkf4mB84%g9r%9)Z;M6wR3<(RSOK6W^sT9rV7xo~Knl6ZH=UIVzb>M>-m5V0- z{Vf3tW=Tj-bTIbh=r3~__g_h}YQLumspNg?yn`9j^wIpjOSQ6Hmu!@TQ ge>X}0Z^OaKqoPWj{M^dwkN*%=B`w7&`H!Lh15g(U+W-In literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/Square30x30Logo.png b/Journal.App/src-tauri/icons/Square30x30Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..621970023096ed9f494ba18ace15421a45cd65fa GIT binary patch literal 903 zcmV;219<$2P)2 z+CUKPMqaqGiH;zb!R4$B-WXS^YzQr=@UH>k4?*L)&R=zYjBrZenKdc9|JlS$SO*RJ zKt8FSTDAdk1g_WPAO!p^V!AuL;Lm;uQyV;zKq)J3i(;q*;k+pD%f3eltU`PYdy9(k0&%` zuWAPcV6|-y?|?7O1W!KSK}pbk8#~!|FA@(VJkt^V@0lio{afoAeo*f&$W2s6${5!1eKvAGD2$GZwSB98L2ZVS- zKn8ENRkZ*sb!@QugOrQNK3(sy1v%J#m|rpB+h|Nkqa3FRT>74xSs{#&saU2Lf!_Iq zKmuKAESh`gs!fneGWn+nf}l?7jE$HW!Af&vE5=G!QU)U2v&HLIBGXKk4nQx{hsHjL zLPMAo5=*uInFbq7(aa`Y2VX5wCmaeqvECOFv)a>0t>ZaEb*cJccER=BB?KFZhV$c^ znL*l8x*UYZv4WK|j?~Jt6~~F%{pk~z5A*>^M`?r5m9@RJ_x|uEtX(6Vk@Y()MVto* z93wr)%3m%|#OZ~srm>zF(JvDuTq*@;d&^>_BJm5hOU`3FjG70L#Vzv9I?`<7$T@

jU?lMi@tgxr7CqX_r3uw^y4tVU3Pm0sw;|1WSUO%?=bG`*Kmz6u4{#ti;T7AWIBAEh!(Y zz>O01&#X?Ds@L)Sb{CkG#Yz4$3o d@96)?#cz^xWoA}>B$xmI002ovPDHLkV1l3&k#zt7 literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/Square310x310Logo.png b/Journal.App/src-tauri/icons/Square310x310Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..f9bc04839491e66c07b16ab03743c0c53b4109cc GIT binary patch literal 8591 zcmbtahc}$h_twIy(GxYgAVgi!!xDs*)f2s!wX2s9Bo-?nB+*%-1*_LxM2i}|mu0o+ zU80NN=kxs+esj*8_ssL&Gk4CMdGGr?_s$21o+dQ~D+K`o0kyW4x&Z+JA@IKrAiYI) znp%o(ALO1|uY3pyC>j3igaqjs_isT$9|KJ_g7P8ut=j>Kvnp7XfS~FVJ7pZI}8ladf{o!;c zm1(K;-KkdRXO-n=L1P0pQv0P`U(b2~9nEJ=@_rst-RE_UCEIhCS6ZC{wgP%L=ch&T zC*gow@BgnRJVg7H?|j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|w1kC1*m?YYZ09nmm_FZmuB$_# zk{v%y>m^Tdy90z-*!iA8Ha^SqoV$&AN=gVf{Js3@&#zS*=V95VC*dZ|_X01eJuHPj z&t)6guurq})cOc3)yB9D8i{uP!Kq4`zV|eWQlf~CDCb*JYct+SEPZQGxqjV25jnSM zi$-ZODVp9Fbu$QxA0GVsB6CBO0b0Vcous}uq5ufZZ8bLCugAyzK0RM+`mi$2GJiv9 zeodu0bcZ0&_8$Dx%o9Ow{K3RFpuA9F*>v9=AC(~^QdPo4KdOtgn7R1!95RCBkF*!g z*JLGxVL=XTJcJ&;bovwyD>{oJ9UPpxCuKKnE zx(p0Ic;-AliYQ8n8m9ty9dh4Qt01R>kA73vm+XbG+$bNs;p)ye4it3y2wdq9p-6wE zlxVgiS?NEEF{KCPA@m?0M%80hRL1X|AV(KFZsa^L(M{^rz0 zfLvUvu~gv$st_YIao`u;jrUnd_I6dZ?ln-nefudZ-97H1;6JET9r9*AF){!E002ov JPDHLkV1lm|RXG3v literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/Square71x71Logo.png b/Journal.App/src-tauri/icons/Square71x71Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..63440d7984936a9caa89275928d8dce97e4d033b GIT binary patch literal 2011 zcmV<12PF83P) zNQT)H*aaHEvPo@cmXa#lOYSVWlpR1nAeK#0OX|;=*_qi5z??aA=FFLM-4Sq2kUOhO z__7Kf+yUXO;t~3LY3h_?kg^Ly_=vx^#d`M`3g*hiK~ZY3AT~jwFz3ZcM?f3JYN1%a z6(!V_i6eLKHt^>r*a)I0z_0NJhQk($6o5l!E{?JkPrSxoeQ-;Fqc_D`_YF8=rsANr zG)LA_971eEG~9CGYBLi@?p9m)@)Tx607JQ+*Ue@kj-@a(D+T!4#k)I>|5h&OqgB`h z?c4$tE)KfVHvW8WK2f$Y7BwM~AJbeyzOSy~m#(8wbuiN%36#mj3KfSHV@MPU&upJC z26nV0*ffeHL`yvW^BH8IFmcq)d*U$Vl;hF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lZRg}VI}n$=LX#ir?o<<^0sg5 zN|-@JdGY{GL;`XeNW08l_wf?EikSl}`;3gBb&#N(&gd_jOIhFp{l~`p?&+8lTDK}l zRR=(1F6Br(ybl7u7*)p4+<$%-TPb#5`hFH({TTy}b4Z?TSuDBNMp^fx=?&C{@;~ya zMF)H_j;;gOr?;1{&&2z#9#xLg$7W0~6W#ogS0%ZyuDXv!w)N~--?|OHz2?TdrO6fN zYVahQA)_b-@h6UkEc`P|p}o4O2m9)9jg5Jfj}D9||9S7)Tahm&) z1wC&y8OS?qtK3u_g%(G~OnZxVet5e2CV6=z@}g@=*NcsplC;J!QAkBFq~>pWtW2ARe Kx8Vjl{{H|h@<;Lj literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/icon.ico b/Journal.App/src-tauri/icons/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..b3636e4b22ba65db9061cd60a77b02c92022dfd6 GIT binary patch literal 86642 zcmeEP2|U!>7oQpXz6;qIyGWagPzg~;i?ooGXpc%o)+~`MC6#O`?P*_Srl`>>O4^Vl zt=7su|8s`v_4?O)M!om+p5N#5ojdpUyUV%foO|y2yFUVfNMI)j3lqRqBrISj5XKP* z1VzP8|30{X1nva{bow>8iG-;V5CAR=-#C~+ST9E;Xn-Gr!ky0h;1D2Lf*4;X82+F5 z^O!~^Jf^7tRQm(w05$`n0FD500O1jY`PTJCTr&uF8&Ctd3%CcU15g0^07(D;)9Adf zstIlhAP-;y5Cn(-CIB#7-_;YEcYcq9pC`~SCax^yT;tqFlpu0SAAgb0M(%>+U?7k~|H%oqaU zG7;{Jz;i$ysD3TnZ-VD-5EkR2olyjs0?__2E-*ZQm7VF#;NSU+_7OmYx`1^UZOBN# zZ~z&=UqaKwI`Y#Ck2VnUWrsY50ipqDyIunt0QGGg8gr?2RTL#iQ3}^>n-k1l{K?P(24g%0NBOjQwp>0N6 zhjzBRS^h3uXS+k@hxlm#X1Zv9Hv0OTvCgXwwP zq#48g-{<`$)9@L955ofX03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>a=!f}L%Oy)Ne+E!rZN+?)6rep3w`P>y_2pjaik#!D+ zI$%7y@HaK>use5emETNuwjH~aC*rU2j72C0H*^bO@&!m)TefkO;l65964?5mde6ff6;y@+is%x(IOQNL zt{(rXW=OY1r{~9a`86Qq^WnBbRl>d|L`@;ORJj2DP?;w^Ex>+y;XO;HA;X>8&;qUW zGNDPBB=?8g#(a-%QYWC;V$ zFKw+WDK?O!^QcU`$z@`U452q;TGXTjafgXWv@K#b^v13h(Z<9b0PJxFWEd^3OLHm; zw(XQXlT2_PF%#F}5T@+8wo-A|=&^2HmVa(axq$&%DfCB5a8=n`1!|_}tbS@E!ZJ^1 zf#WmjlYIP!jZ)N?u|#3Yi1pLW_=atSAZ*JPfj1+Ws$OG z313h8CQjD5E5DYY*531m^G~Q~8W@ZTfLo1r+wU*x6ot?&aoHDOfRuV$rTM2D$4hlV z{?HdA<8tY0lJU4~CvkF~x?ld7vA0EKn@@q|ZWfrr5)&K@avzS-D)aeii2Hxl{QR$SC}|sBR)4XPFAh@xs+mB}csE@A5$cWq0B-FI AKmY&$ literal 0 HcmV?d00001 diff --git a/Journal.App/src-tauri/icons/icon.png b/Journal.App/src-tauri/icons/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e1cd2619e0b5ec089cbba5ec7b03ddf2b1dfceb6 GIT binary patch literal 14183 zcmc&*hgTC%wBCeJLXln+C6oXPQk9~VfFMXm0g;ZP*k}rfNJ&5hL6qJ^iXdG;rPl-j zsR|1I=p-T?fe4|6B>UEP-v97&PEK|+vvX&6XYSnlec!}dTN-n*A7cjqfXn2P;S~UY zLx*sHjRpFlJRYS&KS;kz4*meZ!T;|I175!of&PT~UopM_RDCs#mpz{dm* z+I40CP^Xy~>f1hst(sm!stqil+5R3%vrLgnC*MQ4d&;9 z;#YCkVE=nijZ2oA&dg$~*dLv_6klcUz7sXWtz@@nzE~+QLAmPNQ10W&z^aJ+*{z+z zt-jG-nm6Hv%>O@s2=9)k5=H0YTwx6IkHBFr70X+2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duNj`qqMZAAIrbkJN$h+hkbG|IT8OK{Ug*BfV7`67$&?LOS3 zhT3Rfp==4iG-;np#jrT<8R%UC;K~puSgdfHC=_ot5?)jrFH>g5KAHEmwtQHkiiyN6B2g)XX%#m5#`fPyR!RI z5M2-E&!BSvrD+Em(}f*VFd%7AUmA0^Xux{c6R@kes6AJzJ& z$cFLCdjgU*hhG=2ehpu4QV4{1_1}3xN*GT943{@|4Thv)b7D;}$=^aWh^Br?N?865 ze}23(;yHT?oU)V+g#unK^kTnu+&VG#yu?!i1ZS zX#zTt$Y09M-=Rc6Iuhe|Ob~eU*%@fPZN~VrOx>t^1`Q%}NUp)J0DC-ery?iN=fNtg zq7es_@hL>?<+(aOv@b@GpD7&pcXKau3j!2~_)QD3BkTSIY|}(3XJQ?06)6p4G;-;}Y@)~&+B4D(Q#kj~nC@K=65{rb~5fQ?27_$O{UA`h=+ zk-SJ^m5V?CHa5hGtTxIb(OyI-KI(h=_sPXWD{u)Jfy&f{MB0%pYWZKL>oHzz7diuV z|7}09KDCW$bxeIded}%F(v~XTCr-r)5uOjh(AFjgg#6KCwXCfpXOq1yFS3^Z6P|1A z<+TjRjM)9!)l+*g$=V9-@u+q_sGjk)=&553xTvh7zFfhz|Ai$yQkNtPN!M4%ED^8g zosuJv=Y%Lz8R20ju_!X6`D, + #[serde(default)] + id: Option, + #[serde(default)] + r#type: Option, + #[serde(default)] + tag: Option, + #[serde(default)] + payload: Option, +} + +const DEFAULT_SETTINGS_TAGS: &[&str] = &["Personal", "Work", "Ideas", "Journal"]; +const DEFAULT_FRAGMENT_TYPES: &[&str] = &["Quote", "Snippet", "Reference"]; +const DEFAULT_STARTUP_VIEW: &str = "entries"; + +#[derive(Deserialize, Serialize)] +struct AppSettings { + #[serde(default, skip_serializing_if = "Option::is_none")] + sidecar_root: Option, + #[serde(default = "default_settings_tags")] + tags: Vec, + #[serde(default = "default_fragment_types")] + fragment_types: Vec, + #[serde(default = "default_startup_view")] + default_startup_view: String, +} + +impl Default for AppSettings { + fn default() -> Self { + Self { + sidecar_root: None, + tags: default_settings_tags(), + fragment_types: default_fragment_types(), + default_startup_view: default_startup_view(), + } + } +} + +fn default_settings_tags() -> Vec { + DEFAULT_SETTINGS_TAGS + .iter() + .map(|v| (*v).to_string()) + .collect() +} + +fn default_fragment_types() -> Vec { + DEFAULT_FRAGMENT_TYPES + .iter() + .map(|v| (*v).to_string()) + .collect() +} + +fn default_startup_view() -> String { + DEFAULT_STARTUP_VIEW.to_string() +} + +fn normalize_items(values: Vec, fallback: &[&str]) -> Vec { + let mut seen = HashSet::new(); + let mut normalized = Vec::new(); + for item in values { + let trimmed = item.trim(); + if trimmed.is_empty() { + continue; + } + let key = trimmed.to_lowercase(); + if seen.insert(key) { + normalized.push(trimmed.to_string()); + } + } + + if normalized.is_empty() { + return fallback.iter().map(|v| (*v).to_string()).collect(); + } + + normalized +} + +fn normalize_startup_view(value: Option) -> String { + let normalized = value + .unwrap_or_else(default_startup_view) + .trim() + .to_lowercase(); + match normalized.as_str() { + "entries" | "calendar" | "fragments" | "todos" | "lists" => normalized, + _ => default_startup_view(), + } +} + +struct ManagedSidecar { + child: Child, + stdin: ChildStdin, + stdout: BufReader, +} + +impl ManagedSidecar { + fn start(root: &Path) -> Result { + let sidecar_path = resolve_sidecar_path(root)?; + let mut cmd = Command::new(sidecar_path); + cmd.stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::inherit()) + .current_dir(root) + .env("JOURNAL_PROJECT_ROOT", root) + .kill_on_drop(true); + #[cfg(windows)] + cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW + let mut child = cmd + .spawn() + .map_err(|err| format!("Failed to start sidecar process: {err}"))?; + + let stdin = child + .stdin + .take() + .ok_or_else(|| "Unable to open sidecar stdin.".to_string())?; + let stdout = child + .stdout + .take() + .ok_or_else(|| "Unable to open sidecar stdout.".to_string())?; + + Ok(Self { + child, + stdin, + stdout: BufReader::new(stdout), + }) + } + + fn is_running(&mut self) -> bool { + match self.child.try_wait() { + Ok(None) => true, + Ok(Some(_)) => false, + Err(_) => false, + } + } + + async fn send_command_line(&mut self, input_line: &str) -> Result { + self.stdin + .write_all(format!("{input_line}\n").as_bytes()) + .await + .map_err(|err| format!("Failed writing to sidecar stdin: {err}"))?; + self.stdin + .flush() + .await + .map_err(|err| format!("Failed flushing sidecar stdin: {err}"))?; + + let mut response_line = String::new(); + let read = self + .stdout + .read_line(&mut response_line) + .await + .map_err(|err| format!("Failed reading sidecar stdout: {err}"))?; + if read == 0 { + return Err("Sidecar stdout closed unexpectedly.".to_string()); + } + + let trimmed = response_line.trim().to_string(); + if trimmed.is_empty() { + return Err("Sidecar returned an empty response line.".to_string()); + } + + Ok(trimmed) + } +} + +impl Drop for ManagedSidecar { + fn drop(&mut self) {} +} + +struct SidecarState { + process: Mutex>, + root_override: Mutex>, + config_path: PathBuf, +} + +fn load_settings(path: &Path) -> AppSettings { + fs::read_to_string(path) + .ok() + .and_then(|s| serde_json::from_str(&s).ok()) + .unwrap_or_default() +} + +fn save_settings(path: &Path, settings: &AppSettings) -> Result<(), String> { + let json = serde_json::to_string_pretty(settings) + .map_err(|e| format!("Failed to serialize settings: {e}"))?; + fs::write(path, json).map_err(|e| format!("Failed to save settings: {e}")) +} + +fn auto_detect_root() -> Result { + let mut current = + env::current_dir().map_err(|err| format!("Unable to read current dir: {err}"))?; + loop { + if current.join("Journal.Sidecar").exists() { + return Ok(current); + } + if !current.pop() { + return Err("Unable to locate repository root containing Journal.Sidecar.".to_string()); + } + } +} + +fn effective_root(root_override: &Option) -> Result { + if let Some(root) = root_override { + return Ok(root.clone()); + } + auto_detect_root() +} + +fn resolve_sidecar_path(root: &Path) -> Result { + let root_exe_path = root.join("Journal.Sidecar.exe"); + if root_exe_path.exists() { + return Ok(root_exe_path); + } + + let root_publish_exe_path = root.join("publish").join("Journal.Sidecar.exe"); + if root_publish_exe_path.exists() { + return Ok(root_publish_exe_path); + } + + let debug_path = root.join("Journal.Sidecar/bin/Debug/net10.0/Journal.Sidecar.exe"); + if debug_path.exists() { + return Ok(debug_path); + } + + let release_path = + root.join("Journal.Sidecar/bin/Release/net10.0/win-x64/publish/Journal.Sidecar.exe"); + if release_path.exists() { + return Ok(release_path); + } + + let sidecar_root = root.join("Journal.Sidecar"); + if let Some(path) = find_sidecar_executable(&sidecar_root) { + return Ok(path); + } + + Err("Journal.Sidecar.exe not found. Build Journal.Sidecar first.".to_string()) +} + +fn find_sidecar_executable(search_root: &Path) -> Option { + if !search_root.exists() { + return None; + } + + let mut stack = vec![search_root.to_path_buf()]; + while let Some(dir) = stack.pop() { + let Ok(entries) = fs::read_dir(&dir) else { + continue; + }; + + for entry in entries { + let Ok(entry) = entry else { + continue; + }; + let path = entry.path(); + if path.is_dir() { + stack.push(path); + continue; + } + + let is_sidecar_exe = path + .file_name() + .and_then(|name| name.to_str()) + .map(|name| name.eq_ignore_ascii_case("Journal.Sidecar.exe")) + .unwrap_or(false); + if is_sidecar_exe { + return Some(path); + } + } + } + + None +} + +async fn send_with_managed_sidecar( + state: &SidecarState, + input_line: &str, +) -> Result { + let root = { + let root_override = state.root_override.lock().await; + effective_root(&root_override)? + }; + let mut guard = state.process.lock().await; + + for attempt in 1..=2 { + let should_start = match guard.as_mut() { + Some(existing) => !existing.is_running(), + None => true, + }; + if should_start { + *guard = Some(ManagedSidecar::start(&root)?); + } + + let Some(process) = guard.as_mut() else { + return Err("Sidecar process unavailable.".to_string()); + }; + + match process.send_command_line(input_line).await { + Ok(line) => return Ok(line), + Err(err) => { + *guard = None; + if attempt == 2 { + return Err(err); + } + } + } + } + + Err("Failed to send command to sidecar.".to_string()) +} + +async fn stop_managed_sidecar(state: &SidecarState) { + let mut guard = state.process.lock().await; + guard.take(); +} + +#[tauri::command] +async fn get_sidecar_root(state: tauri::State<'_, SidecarState>) -> Result { + let root_override = state.root_override.lock().await.clone(); + let root = effective_root(&root_override)?; + Ok(serde_json::json!({ + "root": root.to_string_lossy(), + "isCustom": root_override.is_some() + })) +} + +#[tauri::command] +async fn set_sidecar_root( + state: tauri::State<'_, SidecarState>, + path: String, +) -> Result { + let (new_override, root) = if path.trim().is_empty() { + let detected = auto_detect_root()?; + (None, detected) + } else { + let new_root = PathBuf::from(&path); + if !new_root.exists() { + return Err(format!( + "Directory '{}' does not exist.", + new_root.display() + )); + } + resolve_sidecar_path(&new_root)?; + (Some(new_root.clone()), new_root) + }; + + // Stop the current sidecar so it restarts with new root + { + let mut guard = state.process.lock().await; + guard.take(); + } + + let is_custom = new_override.is_some(); + *state.root_override.lock().await = new_override.clone(); + + let mut settings = load_settings(&state.config_path); + settings.sidecar_root = new_override.map(|p| p.to_string_lossy().into_owned()); + save_settings(&state.config_path, &settings)?; + + Ok(serde_json::json!({ + "root": root.to_string_lossy(), + "isCustom": is_custom + })) +} + +#[tauri::command] +async fn get_ui_settings(state: tauri::State<'_, SidecarState>) -> Result { + let settings = load_settings(&state.config_path); + let tags = normalize_items(settings.tags, DEFAULT_SETTINGS_TAGS); + let fragment_types = normalize_items(settings.fragment_types, DEFAULT_FRAGMENT_TYPES); + let startup_view = normalize_startup_view(Some(settings.default_startup_view)); + + Ok(serde_json::json!({ + "tags": tags, + "fragmentTypes": fragment_types, + "defaultStartupView": startup_view + })) +} + +#[tauri::command] +async fn set_ui_settings( + state: tauri::State<'_, SidecarState>, + tags: Vec, + fragment_types: Vec, + default_startup_view: Option, +) -> Result { + let mut settings = load_settings(&state.config_path); + settings.tags = normalize_items(tags, DEFAULT_SETTINGS_TAGS); + settings.fragment_types = normalize_items(fragment_types, DEFAULT_FRAGMENT_TYPES); + settings.default_startup_view = normalize_startup_view(default_startup_view); + save_settings(&state.config_path, &settings)?; + + Ok(serde_json::json!({ + "tags": settings.tags, + "fragmentTypes": settings.fragment_types, + "defaultStartupView": settings.default_startup_view + })) +} + +#[tauri::command] +async fn shutdown( + state: tauri::State<'_, SidecarState>, + app_handle: tauri::AppHandle, +) -> Result<(), String> { + stop_managed_sidecar(state.inner()).await; + app_handle.exit(0); + Ok(()) +} + +#[tauri::command] +async fn sidecar_command( + state: tauri::State<'_, SidecarState>, + command: CommandEnvelope, +) -> Result { + if command.action.trim().is_empty() { + return Err("Missing action".to_string()); + } + + let input_line = serde_json::to_string(&command) + .map_err(|err| format!("Serialize command failed: {err}"))?; + let response_line = send_with_managed_sidecar(state.inner(), &input_line).await?; + serde_json::from_str::(&response_line) + .map_err(|err| format!("Invalid sidecar JSON response: {err}")) +} + +#[cfg_attr(mobile, tauri::mobile_entry_point)] +pub fn run() { + let app = tauri::Builder::default() + .plugin(tauri_plugin_dialog::init()) + .plugin(tauri_plugin_opener::init()) + .invoke_handler(tauri::generate_handler![ + sidecar_command, + shutdown, + get_sidecar_root, + set_sidecar_root, + get_ui_settings, + set_ui_settings, + ]) + .setup(|app| { + let config_dir = app.path().app_config_dir()?; + fs::create_dir_all(&config_dir).ok(); + let config_path = config_dir.join("settings.json"); + let settings = load_settings(&config_path); + let root_override = settings.sidecar_root.map(PathBuf::from); + + app.manage(SidecarState { + process: Mutex::new(None), + root_override: Mutex::new(root_override), + config_path, + }); + Ok(()) + }) + .build(tauri::generate_context!()) + .expect("error while building tauri application"); + + app.run(|app_handle, event| { + if let tauri::RunEvent::ExitRequested { .. } = event { + let state = app_handle.state::(); + if let Ok(mut guard) = state.process.try_lock() { + guard.take(); + }; + } + }); +} diff --git a/Journal.App/src-tauri/src/main.rs b/Journal.App/src-tauri/src/main.rs new file mode 100644 index 0000000..2c417cb --- /dev/null +++ b/Journal.App/src-tauri/src/main.rs @@ -0,0 +1,6 @@ +// Prevents additional console window on Windows in release, DO NOT REMOVE!! +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +fn main() { + journalapp_lib::run() +} diff --git a/Journal.App/src-tauri/tauri.conf.json b/Journal.App/src-tauri/tauri.conf.json new file mode 100644 index 0000000..ffc904b --- /dev/null +++ b/Journal.App/src-tauri/tauri.conf.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "Project Journal", + "version": "0.1.0", + "identifier": "com.stan.journal", + "build": { + "beforeDevCommand": "npm run dev", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "npm run build", + "frontendDist": "../build" + }, + "app": { + "windows": [ + { + "title": "Project Journal", + "width": 1366, + "height": 768 + } + ], + "security": { + "csp": null + } + }, + "bundle": { + "active": true, + "targets": "all", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ] + } +} \ No newline at end of file diff --git a/Journal.App/src/app.html b/Journal.App/src/app.html new file mode 100644 index 0000000..ef938e9 --- /dev/null +++ b/Journal.App/src/app.html @@ -0,0 +1,15 @@ + + + + + + + + + Journal + %sveltekit.head% + + +

+ + diff --git a/Journal.App/src/lib/backend/auth.ts b/Journal.App/src/lib/backend/auth.ts new file mode 100644 index 0000000..b3f8697 --- /dev/null +++ b/Journal.App/src/lib/backend/auth.ts @@ -0,0 +1,89 @@ +import { sendCommand } from "./client"; +import { pickCase } from "./normalize"; + +export function hydrateWorkspace(password: string): Promise { + return sendCommand({ + action: "db.hydrate_workspace", + payload: { password } + }); +} + +type RuntimeConfigRaw = { + dataDirectory?: string; + vaultDirectory?: string; + DataDirectory?: string; + VaultDirectory?: string; +}; + +type RuntimeConfig = { + dataDirectory: string; + vaultDirectory: string; +}; + +type PersistOptions = { + keepalive?: boolean; +}; + +async function getRuntimeConfig(options: PersistOptions = {}): Promise { + const data = await sendCommand( + { + action: "config.get" + }, + options + ); + + return { + dataDirectory: pickCase(data, "dataDirectory", "DataDirectory", ""), + vaultDirectory: pickCase(data, "vaultDirectory", "VaultDirectory", "") + }; +} + +export async function unlockVaultWorkspace(password: string): Promise { + const config = await getRuntimeConfig(); + const loaded = await sendCommand({ + action: "vault.load_all", + payload: { + password, + vaultDirectory: config.vaultDirectory, + dataDirectory: config.dataDirectory + } + }); + + if (!loaded) { + throw new Error("Incorrect vault password."); + } + + await sendCommand({ + action: "db.hydrate_workspace", + payload: { + password, + dataDirectory: config.dataDirectory + } + }); +} + +export async function persistAndClearVault(password: string, options: PersistOptions = {}): Promise { + const config = await getRuntimeConfig(options); + + await sendCommand( + { + action: "vault.rebuild_all", + payload: { + password, + vaultDirectory: config.vaultDirectory, + dataDirectory: config.dataDirectory + } + }, + options + ); + + await sendCommand( + { + action: "vault.clear_data_directory", + payload: { + dataDirectory: config.dataDirectory + } + }, + options + ); +} diff --git a/Journal.App/src/lib/backend/client.ts b/Journal.App/src/lib/backend/client.ts new file mode 100644 index 0000000..1ab887b --- /dev/null +++ b/Journal.App/src/lib/backend/client.ts @@ -0,0 +1,27 @@ +import { invoke } from "$lib/runtime/invoke"; +import type { BackendCommand, BackendResponse } from "./types"; + +function newCorrelationId(): string { + return `ui-${Date.now()}-${Math.random().toString(16).slice(2)}`; +} + +type SendCommandOptions = { + keepalive?: boolean; +}; + +export async function sendCommand(command: BackendCommand, options: SendCommandOptions = {}): Promise { + const envelope: BackendCommand = { + ...command, + correlationId: command.correlationId ?? newCorrelationId() + }; + const response = await invoke>("sidecar_command", { + command: envelope, + keepalive: options.keepalive === true + }); + + if (!response.ok) { + throw new Error(response.error || "Backend command failed"); + } + + return response.data; +} diff --git a/Journal.App/src/lib/backend/entries.ts b/Journal.App/src/lib/backend/entries.ts new file mode 100644 index 0000000..a4dd4c3 --- /dev/null +++ b/Journal.App/src/lib/backend/entries.ts @@ -0,0 +1,219 @@ +import { sendCommand } from "./client"; +import { normalizeFragment, type FragmentDto, type FragmentDtoRaw } from "./fragments"; +import { pickCase } from "./normalize"; + +export type ParsedSectionDto = { + title: string; + content: string[]; + checkboxes: Record; +}; + +export type JournalEntryDto = { + date: string; + fragments: FragmentDto[]; + rawContent: string; + sections: Record; +}; + +export type EntryListItemDto = { + fileName: string; + filePath: string; +}; + +export type EntryLoadResultDto = { + fileName: string; + filePath: string; + entry: JournalEntryDto; +}; + +export type EntrySaveResultDto = { + filePath: string; +}; + +export type EntrySearchRequestDto = { + dataDirectory: string; + query?: string; + section?: string; + startDate?: string; + endDate?: string; + tags?: string[]; + types?: string[]; + checked?: string[]; + unchecked?: string[]; +}; + +export type EntrySearchResultDto = { + fileName: string; + entry: JournalEntryDto; +}; + +type ParsedSectionDtoRaw = { + title?: string; + content?: string[]; + checkboxes?: Record; + Title?: string; + Content?: string[]; + Checkboxes?: Record; +}; + +type JournalEntryDtoRaw = { + date?: string; + fragments?: FragmentDtoRaw[]; + rawContent?: string; + sections?: Record; + Date?: string; + Fragments?: FragmentDtoRaw[]; + RawContent?: string; + Sections?: Record; +}; + +type EntryListItemDtoRaw = { + fileName?: string; + filePath?: string; + FileName?: string; + FilePath?: string; +}; + +type EntryLoadResultDtoRaw = { + fileName?: string; + filePath?: string; + entry?: JournalEntryDtoRaw; + date?: string; + rawContent?: string; + FileName?: string; + FilePath?: string; + Entry?: JournalEntryDtoRaw; + Date?: string; + RawContent?: string; +}; + +type EntrySaveResultDtoRaw = { + filePath?: string; + FilePath?: string; +}; + +type EntrySearchResultDtoRaw = { + fileName?: string; + entry?: JournalEntryDtoRaw; + date?: string; + rawContent?: string; + FileName?: string; + Entry?: JournalEntryDtoRaw; + Date?: string; + RawContent?: string; +}; + +function normalizeSection(raw: ParsedSectionDtoRaw): ParsedSectionDto { + return { + title: pickCase(raw, "title", "Title", ""), + content: pickCase(raw, "content", "Content", [] as string[]), + checkboxes: pickCase(raw, "checkboxes", "Checkboxes", {} as Record) + }; +} + +function normalizeJournalEntry(raw: JournalEntryDtoRaw | undefined): JournalEntryDto { + const fragments = pickCase(raw, "fragments", "Fragments", [] as FragmentDtoRaw[]); + const sections = pickCase(raw, "sections", "Sections", {} as Record); + return { + date: pickCase(raw, "date", "Date", ""), + fragments: fragments.map(normalizeFragment), + rawContent: pickCase(raw, "rawContent", "RawContent", ""), + sections: Object.fromEntries( + Object.entries(sections).map(([key, value]) => [key, normalizeSection(value)]) + ) + }; +} + +function normalizeEntryListItem(raw: EntryListItemDtoRaw): EntryListItemDto { + return { + fileName: pickCase(raw, "fileName", "FileName", ""), + filePath: pickCase(raw, "filePath", "FilePath", "") + }; +} + +function normalizeEntryLoadResult(raw: EntryLoadResultDtoRaw): EntryLoadResultDto { + const nestedEntry = pickCase(raw, "entry", "Entry", undefined as JournalEntryDtoRaw | undefined); + const entry = + nestedEntry + ? normalizeJournalEntry(nestedEntry) + : normalizeJournalEntry({ + date: pickCase(raw, "date", "Date", undefined as string | undefined), + rawContent: pickCase(raw, "rawContent", "RawContent", undefined as string | undefined), + fragments: [], + sections: {} + }); + + return { + fileName: pickCase(raw, "fileName", "FileName", ""), + filePath: pickCase(raw, "filePath", "FilePath", ""), + entry + }; +} + +function normalizeEntrySearchResult(raw: EntrySearchResultDtoRaw): EntrySearchResultDto { + const nestedEntry = pickCase(raw, "entry", "Entry", undefined as JournalEntryDtoRaw | undefined); + const entry = + nestedEntry + ? normalizeJournalEntry(nestedEntry) + : normalizeJournalEntry({ + date: pickCase(raw, "date", "Date", undefined as string | undefined), + rawContent: pickCase(raw, "rawContent", "RawContent", undefined as string | undefined), + fragments: [], + sections: {} + }); + + return { + fileName: pickCase(raw, "fileName", "FileName", ""), + entry + }; +} + +export async function listEntries(dataDirectory?: string): Promise { + const data = await sendCommand({ + action: "entries.list", + payload: { dataDirectory } + }); + + return data.map(normalizeEntryListItem).filter((item) => Boolean(item.filePath)); +} + +export async function loadEntry(filePath: string): Promise { + const data = await sendCommand({ + action: "entries.load", + payload: { filePath } + }); + + return normalizeEntryLoadResult(data); +} + +export async function saveEntry(payload: { + content: string; + filePath?: string; + mode?: string; + fileName?: string; +}): Promise { + const data = await sendCommand({ + action: "entries.save", + payload + }); + + return { + filePath: pickCase(data, "filePath", "FilePath", "") + }; +} + +export async function deleteEntry(filePath: string): Promise { + return sendCommand({ + action: "entries.delete", + payload: { filePath } + }); +} + +export async function searchEntries(payload: EntrySearchRequestDto): Promise { + const data = await sendCommand({ + action: "search.entries", + payload + }); + + return data.map(normalizeEntrySearchResult).filter((item) => Boolean(item.fileName)); +} diff --git a/Journal.App/src/lib/backend/fragments.ts b/Journal.App/src/lib/backend/fragments.ts new file mode 100644 index 0000000..dc0f26f --- /dev/null +++ b/Journal.App/src/lib/backend/fragments.ts @@ -0,0 +1,86 @@ +import { sendCommand } from "./client"; +import { pickCase } from "./normalize"; + +export type FragmentDto = { + id: string; + type: string; + description: string; + time: string; + tags: string[]; +}; + +export type CreateFragmentPayload = { + type: string; + description: string; + tags?: string[]; +}; + +export type UpdateFragmentPayload = { + type?: string; + description?: string; + tags?: string[]; + time?: string; +}; + +export type FragmentDtoRaw = { + id?: string; + type?: string; + description?: string; + time?: string; + tags?: string[]; + Id?: string; + Type?: string; + Description?: string; + Time?: string; + Tags?: string[]; +}; + +export function normalizeFragment(raw: FragmentDtoRaw): FragmentDto { + return { + id: pickCase(raw, "id", "Id", ""), + type: pickCase(raw, "type", "Type", ""), + description: pickCase(raw, "description", "Description", ""), + time: pickCase(raw, "time", "Time", ""), + tags: pickCase(raw, "tags", "Tags", [] as string[]) + }; +} + +export async function listFragments(): Promise { + const data = await sendCommand({ + action: "fragments.list" + }); + return data.map(normalizeFragment).filter((item) => Boolean(item.id)); +} + +export async function getFragment(id: string): Promise { + const data = await sendCommand({ + action: "fragments.get", + id + }); + if (!data) return null; + const normalized = normalizeFragment(data); + return normalized.id ? normalized : null; +} + +export async function createFragment(payload: CreateFragmentPayload): Promise { + const data = await sendCommand({ + action: "fragments.create", + payload + }); + return normalizeFragment(data); +} + +export function updateFragment(id: string, payload: UpdateFragmentPayload): Promise { + return sendCommand({ + action: "fragments.update", + id, + payload + }); +} + +export function deleteFragment(id: string): Promise { + return sendCommand({ + action: "fragments.delete", + id + }); +} diff --git a/Journal.App/src/lib/backend/lists.ts b/Journal.App/src/lib/backend/lists.ts new file mode 100644 index 0000000..74ec4d8 --- /dev/null +++ b/Journal.App/src/lib/backend/lists.ts @@ -0,0 +1,83 @@ +import { sendCommand } from "./client"; +import { pickCase } from "./normalize"; + +export type ListDocumentDto = { + id: string; + label: string; + content: string; + createdAt: string; + updatedAt: string; +}; + +export type CreateListPayload = { + label: string; + content?: string; +}; + +export type UpdateListPayload = { + label?: string; + content?: string; +}; + +type ListDocumentDtoRaw = { + id?: string; + label?: string; + content?: string; + createdAt?: string; + updatedAt?: string; + Id?: string; + Label?: string; + Content?: string; + CreatedAt?: string; + UpdatedAt?: string; +}; + +export function normalizeList(raw: ListDocumentDtoRaw): ListDocumentDto { + return { + id: pickCase(raw, "id", "Id", ""), + label: pickCase(raw, "label", "Label", ""), + content: pickCase(raw, "content", "Content", ""), + createdAt: pickCase(raw, "createdAt", "CreatedAt", ""), + updatedAt: pickCase(raw, "updatedAt", "UpdatedAt", "") + }; +} + +export async function listLists(): Promise { + const data = await sendCommand({ + action: "lists.list" + }); + return data.map(normalizeList).filter((item) => Boolean(item.id)); +} + +export async function getList(id: string): Promise { + const data = await sendCommand({ + action: "lists.get", + id + }); + if (!data) return null; + const normalized = normalizeList(data); + return normalized.id ? normalized : null; +} + +export async function createList(payload: CreateListPayload): Promise { + const data = await sendCommand({ + action: "lists.create", + payload + }); + return normalizeList(data); +} + +export function updateList(id: string, payload: UpdateListPayload): Promise { + return sendCommand({ + action: "lists.update", + id, + payload + }); +} + +export function deleteList(id: string): Promise { + return sendCommand({ + action: "lists.delete", + id + }); +} diff --git a/Journal.App/src/lib/backend/normalize.ts b/Journal.App/src/lib/backend/normalize.ts new file mode 100644 index 0000000..6dded60 --- /dev/null +++ b/Journal.App/src/lib/backend/normalize.ts @@ -0,0 +1,18 @@ +type UnknownObject = Record; + +function asObject(value: unknown): UnknownObject | undefined { + return value && typeof value === "object" ? (value as UnknownObject) : undefined; +} + +export function pickCase( + source: unknown, + camelKey: string, + pascalKey: string, + fallback: T +): T { + const obj = asObject(source); + if (!obj) return fallback; + + const value = obj[camelKey] ?? obj[pascalKey]; + return (value as T | undefined) ?? fallback; +} diff --git a/Journal.App/src/lib/backend/templates.ts b/Journal.App/src/lib/backend/templates.ts new file mode 100644 index 0000000..79bf828 --- /dev/null +++ b/Journal.App/src/lib/backend/templates.ts @@ -0,0 +1,90 @@ +import { sendCommand } from "./client"; +import { pickCase } from "./normalize"; + +export type EntryTemplateItemDto = { + fileName: string; + filePath: string; +}; + +export type EntryTemplateLoadResultDto = { + fileName: string; + filePath: string; + content: string; +}; + +export type EntryTemplateSaveResultDto = { + filePath: string; +}; + +type EntryTemplateItemDtoRaw = { + fileName?: string; + filePath?: string; + FileName?: string; + FilePath?: string; +}; + +type EntryTemplateLoadResultDtoRaw = { + fileName?: string; + filePath?: string; + content?: string; + FileName?: string; + FilePath?: string; + Content?: string; +}; + +type EntryTemplateSaveResultDtoRaw = { + filePath?: string; + FilePath?: string; +}; + +function normalizeTemplateItem(raw: EntryTemplateItemDtoRaw): EntryTemplateItemDto { + return { + fileName: pickCase(raw, "fileName", "FileName", ""), + filePath: pickCase(raw, "filePath", "FilePath", "") + }; +} + +export async function listEntryTemplates(dataDirectory?: string): Promise { + const data = await sendCommand({ + action: "templates.list", + payload: { dataDirectory } + }); + + return data.map(normalizeTemplateItem).filter((item) => Boolean(item.filePath)); +} + +export async function loadEntryTemplate(filePath: string): Promise { + const data = await sendCommand({ + action: "templates.load", + payload: { filePath } + }); + + return { + fileName: pickCase(data, "fileName", "FileName", ""), + filePath: pickCase(data, "filePath", "FilePath", ""), + content: pickCase(data, "content", "Content", "") + }; +} + +export async function saveEntryTemplate(payload: { + name: string; + content: string; + filePath?: string; + dataDirectory?: string; +}): Promise { + const data = await sendCommand({ + action: "templates.save", + payload + }); + + return { + filePath: pickCase(data, "filePath", "FilePath", "") + }; +} + +export async function deleteEntryTemplate(filePath: string): Promise { + return sendCommand({ + action: "templates.delete", + payload: { filePath } + }); +} diff --git a/Journal.App/src/lib/backend/todos.ts b/Journal.App/src/lib/backend/todos.ts new file mode 100644 index 0000000..1802e9e --- /dev/null +++ b/Journal.App/src/lib/backend/todos.ts @@ -0,0 +1,144 @@ +import { sendCommand } from "./client"; +import { pickCase } from "./normalize"; + +export type TodoItemDto = { + id: string; + listId: string; + text: string; + done: boolean; + sortOrder: number; +}; + +export type TodoListDto = { + id: string; + label: string; + createdAt: string; + items: TodoItemDto[]; +}; + +export type CreateTodoListPayload = { + label: string; +}; + +export type UpdateTodoListPayload = { + label?: string; +}; + +export type CreateTodoItemPayload = { + listId: string; + text: string; + sortOrder?: number; +}; + +export type UpdateTodoItemPayload = { + text?: string; + done?: boolean; + sortOrder?: number; +}; + +type TodoItemDtoRaw = { + id?: string; + listId?: string; + text?: string; + done?: boolean; + sortOrder?: number; + Id?: string; + ListId?: string; + Text?: string; + Done?: boolean; + SortOrder?: number; +}; + +type TodoListDtoRaw = { + id?: string; + label?: string; + createdAt?: string; + items?: TodoItemDtoRaw[]; + Id?: string; + Label?: string; + CreatedAt?: string; + Items?: TodoItemDtoRaw[]; +}; + +function normalizeItem(raw: TodoItemDtoRaw): TodoItemDto { + return { + id: pickCase(raw, "id", "Id", ""), + listId: pickCase(raw, "listId", "ListId", ""), + text: pickCase(raw, "text", "Text", ""), + done: pickCase(raw, "done", "Done", false), + sortOrder: pickCase(raw, "sortOrder", "SortOrder", 0) + }; +} + +function normalizeList(raw: TodoListDtoRaw): TodoListDto { + const rawItems = pickCase(raw, "items", "Items", [] as TodoItemDtoRaw[]); + return { + id: pickCase(raw, "id", "Id", ""), + label: pickCase(raw, "label", "Label", ""), + createdAt: pickCase(raw, "createdAt", "CreatedAt", ""), + items: rawItems.map(normalizeItem) + }; +} + +export async function listTodoLists(): Promise { + const data = await sendCommand({ + action: "todos.list" + }); + return data.map(normalizeList).filter((item) => Boolean(item.id)); +} + +export async function getTodoList(id: string): Promise { + const data = await sendCommand({ + action: "todos.get", + id + }); + if (!data) return null; + const normalized = normalizeList(data); + return normalized.id ? normalized : null; +} + +export async function createTodoList(payload: CreateTodoListPayload): Promise { + const data = await sendCommand({ + action: "todos.create", + payload + }); + return normalizeList(data); +} + +export function updateTodoList(id: string, payload: UpdateTodoListPayload): Promise { + return sendCommand({ + action: "todos.update", + id, + payload + }); +} + +export function deleteTodoList(id: string): Promise { + return sendCommand({ + action: "todos.delete", + id + }); +} + +export async function createTodoItem(payload: CreateTodoItemPayload): Promise { + const data = await sendCommand({ + action: "todos.items.create", + payload + }); + return normalizeItem(data); +} + +export function updateTodoItem(id: string, payload: UpdateTodoItemPayload): Promise { + return sendCommand({ + action: "todos.items.update", + id, + payload + }); +} + +export function deleteTodoItem(id: string): Promise { + return sendCommand({ + action: "todos.items.delete", + id + }); +} diff --git a/Journal.App/src/lib/backend/types.ts b/Journal.App/src/lib/backend/types.ts new file mode 100644 index 0000000..87644cf --- /dev/null +++ b/Journal.App/src/lib/backend/types.ts @@ -0,0 +1,13 @@ +export type BackendCommand = { + action: string; + correlationId?: string; + id?: string; + type?: string; + tag?: string; + payload?: unknown; +}; + +export type BackendOk = { ok: true; data: T }; +export type BackendErr = { ok: false; error: string }; +export type BackendResponse = BackendOk | BackendErr; + diff --git a/Journal.App/src/lib/components/AppModal.svelte b/Journal.App/src/lib/components/AppModal.svelte new file mode 100644 index 0000000..2ced0ef --- /dev/null +++ b/Journal.App/src/lib/components/AppModal.svelte @@ -0,0 +1,158 @@ + + + + +{#if open} + +{/if} + + diff --git a/Journal.App/src/lib/components/CalendarWidget.svelte b/Journal.App/src/lib/components/CalendarWidget.svelte new file mode 100644 index 0000000..ae436a9 --- /dev/null +++ b/Journal.App/src/lib/components/CalendarWidget.svelte @@ -0,0 +1,260 @@ + + +
+
+ + +
+

{monthLabel}

+ {currentYear} +
+ + +
+ +
+ {#each weekdays as weekday} + {weekday} + {/each} +
+ +
+ {#each cells as cell} + + {/each} +
+
+ + diff --git a/Journal.App/src/lib/components/EditorPanel.svelte b/Journal.App/src/lib/components/EditorPanel.svelte new file mode 100644 index 0000000..b58a529 --- /dev/null +++ b/Journal.App/src/lib/components/EditorPanel.svelte @@ -0,0 +1,339 @@ + + +
+ {#if showLinkedBackButton} +
+ +
+ {/if} + + {#if activeSection === "calendar"} +
+
+

Filtered Entries

+
+ {#if calendarBusy} +

Loading timeline...

+ {:else if calendarError} +

{calendarError}

+ {:else if calendarItems.length === 0} +

No entries matched the current filters.

+ {:else} +
    + {#each calendarCards as item} +
  • + +
  • + {/each} +
+ {/if} +
+ {:else if !openDocumentId} +
+ edit_note +

Select or create an item to get started

+
+ {:else if activeSection === "fragments"} + + {:else if activeSection === "todos"} + + {:else if activeSection === "lists"} + + {:else} + + {/if} +
+ + diff --git a/Journal.App/src/lib/components/Navbar.svelte b/Journal.App/src/lib/components/Navbar.svelte new file mode 100644 index 0000000..a614253 --- /dev/null +++ b/Journal.App/src/lib/components/Navbar.svelte @@ -0,0 +1,183 @@ + + + + + diff --git a/Journal.App/src/lib/components/SidePanel.svelte b/Journal.App/src/lib/components/SidePanel.svelte new file mode 100644 index 0000000..8a82600 --- /dev/null +++ b/Journal.App/src/lib/components/SidePanel.svelte @@ -0,0 +1,1278 @@ + + +
+
+

{panelTitle}

+
+ {#if activeSection === "calendar"} + + {/if} + {#if activeSection === "entries"} + + + {/if} + +
+
+ + {#if isCalendarSection} +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+

Saved Views

+
+ {#each builtInViews as view} + + {/each} + +
+ {#if showSaveViewInput} +
+ { + if (event.key === "Enter") saveCurrentView(); + if (event.key === "Escape") { + showSaveViewInput = false; + saveViewName = ""; + } + }} + on:blur={saveCurrentView} + /> +
+ {/if} + {#if calendarSavedViews.length > 0} +
    + {#each calendarSavedViews as view} +
  • + + +
  • + {/each} +
+ {/if} +
+
+ + + +
+

{calendarMonthLabel} {calendarYear} Timeline

+

Last refreshed: {calendarLastRefreshedAt || "Not yet"}

+
+ {:else} + + + {#if showNewItemInput} +
+ +
+ {/if} + + {#if activeSection === "entries"} +
+

Entries

+ {#if $entriesBusyStore} +

Loading entries...

+ {:else} +
    + {#each entryItems as item} +
  • + +
    + + +
    +
  • + {/each} +
+ {#if !entryItems.length} +

No entries found.

+ {/if} + {/if} +
+ +
+

Templates

+ {#if templatesBusy} +

Loading templates...

+ {:else} +
    + {#each allTemplateItems as item} +
  • + +
    + + +
    +
  • + {/each} +
+ {#if !allTemplateItems.length} +

No templates found.

+ {/if} + {/if} + {#if templateError} +

{templateError}

+ {/if} +
+ {:else} +
    + {#each items as item} +
  • + + {#if showItemActions} +
    + + +
    + {/if} +
  • + {/each} +
+ {/if} + {/if} +
+ + + diff --git a/Journal.App/src/lib/components/editor/FragmentEditor.svelte b/Journal.App/src/lib/components/editor/FragmentEditor.svelte new file mode 100644 index 0000000..163e54c --- /dev/null +++ b/Journal.App/src/lib/components/editor/FragmentEditor.svelte @@ -0,0 +1,406 @@ + + +
+ {#if fragmentMode === "view"} +
+ {@html renderMarkdown(openDocumentContent)} +
+ {:else} +
+

{fragmentMode === "create" ? "New Fragment" : "Edit Fragment"}

+ +
+ + {#if fragmentType === customTypeValue} + + {:else} + + {/if} +
+
+ + +
+ +
+ + +
+
+ {/if} +
+ + diff --git a/Journal.App/src/lib/components/editor/ListEditor.svelte b/Journal.App/src/lib/components/editor/ListEditor.svelte new file mode 100644 index 0000000..5f34b21 --- /dev/null +++ b/Journal.App/src/lib/components/editor/ListEditor.svelte @@ -0,0 +1,278 @@ + + +
+
+
+ + +
+ +
    + {#each items as item} +
  • + {#if editingItemId === item.id} + { + if (event.key === "Enter") saveEditItem(); + if (event.key === "Escape") cancelEditItem(); + }} + /> +
    + + +
    + {:else} + {item.text} +
    + + +
    + {/if} +
  • + {/each} +
+
+
+ + diff --git a/Journal.App/src/lib/components/editor/MarkdownEditor.svelte b/Journal.App/src/lib/components/editor/MarkdownEditor.svelte new file mode 100644 index 0000000..10b9336 --- /dev/null +++ b/Journal.App/src/lib/components/editor/MarkdownEditor.svelte @@ -0,0 +1,575 @@ + + +
+

{editorTitle}

+
+ +
+ {#if !previewOnly} + void applyTemplateByPath(filePath)} + onAttachFragment={(option) => attachReference("Fragment", option)} + onAttachList={(option) => attachReference("List", option)} + onAttachTodo={(option) => attachReference("To-Do", option)} + onBold={() => applyWrap("**")} + onItalic={() => applyWrap("*")} + onLink={insertLink} + onToggleUl={() => toggleListMode("ul")} + onToggleOl={() => toggleListMode("ol")} + onCode={() => applyWrap("`")} + /> + {#if templateError} +

{templateError}

+ {/if} + {/if} + +
+ {#if previewOnly} +
+ {@html renderedHtml} +
+ {:else} + + {/if} +
+
+ + diff --git a/Journal.App/src/lib/components/editor/MarkdownToolbar.svelte b/Journal.App/src/lib/components/editor/MarkdownToolbar.svelte new file mode 100644 index 0000000..a45e300 --- /dev/null +++ b/Journal.App/src/lib/components/editor/MarkdownToolbar.svelte @@ -0,0 +1,236 @@ + + +
+
+ + {#if isEntryDocument} + + + + + + + + {/if} +
+ +
+ + + + + + +
+
+ + diff --git a/Journal.App/src/lib/components/editor/TodoEditor.svelte b/Journal.App/src/lib/components/editor/TodoEditor.svelte new file mode 100644 index 0000000..47c00f7 --- /dev/null +++ b/Journal.App/src/lib/components/editor/TodoEditor.svelte @@ -0,0 +1,306 @@ + + +
+
+
+ + +
+ +
    + {#each todoItems as todo} +
  • + + + {#if editingTodoId === todo.id} + { + if (event.key === "Enter") saveEditTodo(); + if (event.key === "Escape") cancelEditTodo(); + }} + /> +
    + + +
    + {:else} + {todo.text} +
    + + +
    + {/if} +
  • + {/each} +
+
+
+ + diff --git a/Journal.App/src/lib/runtime/invoke.ts b/Journal.App/src/lib/runtime/invoke.ts new file mode 100644 index 0000000..200bb40 --- /dev/null +++ b/Journal.App/src/lib/runtime/invoke.ts @@ -0,0 +1,150 @@ +import type { BackendCommand } from "$lib/backend/types"; + +type InvokeArgs = Record | undefined; + +type WindowWithTauri = Window & { + __TAURI_INTERNALS__?: unknown; +}; + +type UiSettingsPayload = { + tags?: string[]; + fragmentTypes?: string[]; + defaultStartupView?: string; +}; + +type FetchJsonOptions = { + keepalive?: boolean; +}; + +const UI_SETTINGS_KEY = "journal.ui.settings"; + +function normalizedApiBase(): string { + const configured = import.meta.env.VITE_JOURNAL_API_BASE?.trim(); + if (!configured) { + return "/api"; + } + + return configured.endsWith("/") ? configured.slice(0, -1) : configured; +} + +export function isTauriRuntime(): boolean { + if (typeof window === "undefined") { + return false; + } + + return Object.prototype.hasOwnProperty.call(window as WindowWithTauri, "__TAURI_INTERNALS__"); +} + +function readUiSettingsFromLocalStorage(): UiSettingsPayload { + if (typeof window === "undefined") { + return {}; + } + + const raw = window.localStorage.getItem(UI_SETTINGS_KEY); + if (!raw) { + return {}; + } + + try { + const parsed = JSON.parse(raw) as UiSettingsPayload; + return { + tags: Array.isArray(parsed.tags) ? parsed.tags : undefined, + fragmentTypes: Array.isArray(parsed.fragmentTypes) ? parsed.fragmentTypes : undefined, + defaultStartupView: typeof parsed.defaultStartupView === "string" ? parsed.defaultStartupView : undefined + }; + } catch { + return {}; + } +} + +function writeUiSettingsToLocalStorage(payload: UiSettingsPayload): void { + if (typeof window === "undefined") { + return; + } + + const safePayload: UiSettingsPayload = { + tags: Array.isArray(payload.tags) ? payload.tags : undefined, + fragmentTypes: Array.isArray(payload.fragmentTypes) ? payload.fragmentTypes : undefined, + defaultStartupView: typeof payload.defaultStartupView === "string" ? payload.defaultStartupView : undefined + }; + + window.localStorage.setItem(UI_SETTINGS_KEY, JSON.stringify(safePayload)); +} + +async function fetchJson(path: string, init: RequestInit = {}, options: FetchJsonOptions = {}): Promise { + const response = await fetch(`${normalizedApiBase()}${path}`, { + ...init, + keepalive: options.keepalive === true, + headers: { + "Content-Type": "application/json", + ...(init.headers ?? {}) + } + }); + + if (!response.ok) { + const text = await response.text(); + throw new Error(text || `Request failed (${response.status})`); + } + + if (response.status === 204) { + return undefined as T; + } + + return (await response.json()) as T; +} + +export async function invoke(command: string, args?: InvokeArgs): Promise { + if (isTauriRuntime()) { + const tauriCore = await import("@tauri-apps/api/core"); + return tauriCore.invoke(command, args); + } + + switch (command) { + case "sidecar_command": { + const envelope = args?.command; + if (!envelope || typeof envelope !== "object") { + throw new Error("Missing command payload."); + } + + const keepalive = args?.keepalive === true; + + return fetchJson( + "/command", + { + method: "POST", + body: JSON.stringify(envelope as BackendCommand) + }, + { keepalive } + ); + } + case "get_sidecar_root": + return fetchJson("/sidecar/root"); + case "set_sidecar_root": { + const path = typeof args?.path === "string" ? args.path : ""; + return fetchJson("/sidecar/root", { + method: "POST", + body: JSON.stringify({ path }) + }); + } + case "get_ui_settings": + return readUiSettingsFromLocalStorage() as T; + case "set_ui_settings": { + const tags = Array.isArray(args?.tags) ? (args?.tags as string[]) : undefined; + const fragmentTypes = + Array.isArray(args?.fragmentTypes) ? (args?.fragmentTypes as string[]) : + Array.isArray(args?.fragment_types) ? (args?.fragment_types as string[]) : + undefined; + const defaultStartupView = + typeof args?.defaultStartupView === "string" ? args.defaultStartupView : + typeof args?.default_startup_view === "string" ? args.default_startup_view : + undefined; + + writeUiSettingsToLocalStorage({ tags, fragmentTypes, defaultStartupView }); + return undefined as T; + } + case "shutdown": + return undefined as T; + default: + throw new Error(`Unsupported command in web runtime: ${command}`); + } +} diff --git a/Journal.App/src/lib/stores/entries.ts b/Journal.App/src/lib/stores/entries.ts new file mode 100644 index 0000000..8b11d85 --- /dev/null +++ b/Journal.App/src/lib/stores/entries.ts @@ -0,0 +1,185 @@ +import { get, writable } from "svelte/store"; +import { + deleteEntry as deleteEntryCommand, + listEntries as listEntriesCommand, + loadEntry as loadEntryCommand, + saveEntry as saveEntryCommand, + searchEntries as searchEntriesCommand, + type EntryListItemDto, + type EntrySearchRequestDto +} from "$lib/backend/entries"; + +export type EntryItem = { + id: string; + label: string; + initialContent: string; + filePath?: string; + date?: string; +}; + +const initialEntries: EntryItem[] = []; + +export const entriesStore = writable(initialEntries); +export const entriesBusyStore = writable(false); + +function toStoreId(filePath: string): string { + return `entries/file/${encodeURIComponent(filePath)}`; +} + +function toBackendPath(id: string): string | null { + const prefix = "entries/file/"; + if (!id.startsWith(prefix)) return null; + const encoded = id.slice(prefix.length).trim(); + if (!encoded) return null; + + try { + const decoded = decodeURIComponent(encoded); + return decoded || null; + } catch { + return null; + } +} + +function toLabel(fileName: string): string { + const normalized = fileName.trim(); + if (!normalized) return "Untitled Entry"; + return normalized.replace(/\.md$/i, ""); +} + +function upsertById(items: EntryItem[], next: EntryItem): EntryItem[] { + const idx = items.findIndex((item) => item.id === next.id); + if (idx === -1) return [next, ...items]; + const clone = [...items]; + clone[idx] = next; + return clone; +} + +function fromListDto(dto: EntryListItemDto): EntryItem { + return { + id: toStoreId(dto.filePath), + label: toLabel(dto.fileName), + initialContent: "", + filePath: dto.filePath + }; +} + +function fromLoadResult(result: Awaited>): EntryItem { + return { + id: toStoreId(result.filePath), + label: toLabel(result.fileName), + initialContent: result.entry.rawContent, + filePath: result.filePath, + date: result.entry.date + }; +} + +export function getDefaultEntry(items: EntryItem[]): EntryItem | undefined { + return items[0]; +} + +export function createEntryDraft(): EntryItem { + const id = `entries/draft-${Date.now()}`; + return { + id, + label: "Untitled Entry", + initialContent: "# Untitled Entry\n\nStart writing..." + }; +} + +export async function hydrateEntries(dataDirectory?: string): Promise { + entriesBusyStore.set(true); + try { + const items = await listEntriesCommand(dataDirectory); + const mapped = items.map(fromListDto); + entriesStore.set(mapped); + } catch (error) { + console.error("[entries] hydrate:error", error); + throw error; + } finally { + entriesBusyStore.set(false); + } +} + +export async function loadEntryByStoreId(storeId: string): Promise { + const filePath = toBackendPath(storeId); + if (!filePath) return null; + + try { + const loaded = await loadEntryCommand(filePath); + const item = fromLoadResult(loaded); + entriesStore.update((items) => upsertById(items, item)); + return item; + } catch (error) { + console.error("[entries] load:error", { storeId, filePath, error }); + throw error; + } +} + +export async function saveEntryFromStore(storeId: string, content: string, mode?: string): Promise { + const trimmed = content?.trim(); + if (!trimmed) return null; + + const existingPath = toBackendPath(storeId); + let payload: { content: string; filePath?: string; mode?: string; fileName?: string }; + + if (existingPath) { + payload = { content: trimmed, filePath: existingPath, mode }; + } else { + const draft = get(entriesStore).find((item) => item.id === storeId); + payload = { content: trimmed, mode, fileName: draft?.label }; + } + try { + const saved = await saveEntryCommand(payload); + const loaded = await loadEntryCommand(saved.filePath); + const item = fromLoadResult(loaded); + entriesStore.update((items) => { + const filtered = existingPath ? items : items.filter((i) => i.id !== storeId); + return upsertById(filtered, item); + }); + return item; + } catch (error) { + console.error("[entries] save:error", { storeId, error }); + throw error; + } +} + +export async function searchEntriesAsItems(payload: EntrySearchRequestDto): Promise { + const results = await searchEntriesCommand(payload); + const dataDirectory = payload.dataDirectory?.trim() ?? ""; + const separator = dataDirectory.includes("\\") ? "\\" : "/"; + const basePath = dataDirectory.replace(/[\\/]+$/, ""); + const mapped = results.map((result) => ({ + id: basePath + ? toStoreId(`${basePath}${separator}${result.fileName}`) + : `entries/search/${encodeURIComponent(result.fileName)}`, + label: toLabel(result.fileName), + initialContent: result.entry.rawContent, + filePath: basePath ? `${basePath}${separator}${result.fileName}` : undefined, + date: result.entry.date + })); + return mapped; +} + +export async function deleteEntryByStoreId(storeId: string): Promise { + if (storeId.startsWith("entries/draft-")) { + entriesStore.update((items) => items.filter((item) => item.id !== storeId)); + return true; + } + + const filePath = toBackendPath(storeId); + if (!filePath) return false; + + try { + const ok = await deleteEntryCommand(filePath); + if (!ok) return false; + entriesStore.update((items) => items.filter((item) => item.id !== storeId)); + return true; + } catch (error) { + console.error("[entries] delete:error", { storeId, error }); + return false; + } +} + +export function hasEntry(storeId: string): boolean { + return get(entriesStore).some((item) => item.id === storeId); +} diff --git a/Journal.App/src/lib/stores/fragments.ts b/Journal.App/src/lib/stores/fragments.ts new file mode 100644 index 0000000..2945308 --- /dev/null +++ b/Journal.App/src/lib/stores/fragments.ts @@ -0,0 +1,215 @@ +import { get, writable } from "svelte/store"; +import { + createFragment as createFragmentCommand, + deleteFragment as deleteFragmentCommand, + listFragments, + updateFragment as updateFragmentCommand, + type FragmentDto +} from "$lib/backend/fragments"; + +export type FragmentItem = { + id: string; + label: string; + initialContent: string; +}; + +export type ParsedFragment = { + title: string; + type: string; + tags: string[]; + body: string; +}; + +const initialFragments: FragmentItem[] = []; + +export const fragmentsStore = writable(initialFragments); +export const fragmentsBusyStore = writable(false); + +function toStoreId(id: string): string { + return `fragments/${id}`; +} + +function toBackendId(id: string): string | null { + const prefix = "fragments/"; + if (!id.startsWith(prefix)) return null; + const backendId = id.slice(prefix.length).trim(); + return backendId || null; +} + +function splitDescription(description: string): { title: string; body: string } { + const normalized = description.trim(); + if (!normalized) { + return { title: "Untitled Fragment", body: "" }; + } + + const separator = normalized.indexOf("\n\n"); + if (separator === -1) { + return { title: normalized, body: "" }; + } + + const title = normalized.slice(0, separator).trim() || "Untitled Fragment"; + const body = normalized.slice(separator + 2).trim(); + return { title, body }; +} + +function composeDescription(title: string, body: string): string { + const resolvedTitle = title.trim() || "Untitled Fragment"; + const resolvedBody = body.trim() || "Add details for this fragment."; + return `${resolvedTitle}\n\n${resolvedBody}`; +} + +function dtoToItem(dto: FragmentDto): FragmentItem { + const parsed = splitDescription(dto.description); + return { + id: toStoreId(dto.id), + label: parsed.title, + initialContent: serializeFragment({ + title: parsed.title, + type: dto.type, + tags: dto.tags ?? [], + body: parsed.body + }) + }; +} + +function upsertById(items: FragmentItem[], next: FragmentItem): FragmentItem[] { + const idx = items.findIndex((item) => item.id === next.id); + if (idx === -1) { + return [next, ...items]; + } + const clone = [...items]; + clone[idx] = next; + return clone; +} + +export function createFragmentId(title: string): string { + const slug = title + .trim() + .toLowerCase() + .replace(/[^a-z0-9]+/g, "-") + .replace(/^-+|-+$/g, "") + .slice(0, 40); + return `fragments/${slug || "fragment"}-${Date.now()}`; +} + +export function serializeFragment(payload: ParsedFragment): string { + const title = payload.title.trim() || "Untitled Fragment"; + const type = payload.type.trim(); + const tagsLine = payload.tags.length ? payload.tags.map((tag) => `#${tag}`).join(" ") : "(none)"; + const body = payload.body.trim() || "Add details for this fragment."; + return `# ${title}\n\nType: ${type}\nTags: ${tagsLine}\n\n${body}`; +} + +export function parseFragmentContent(content: string, fallbackTitle = "Untitled Fragment"): ParsedFragment { + const headingMatch = content.match(/^#\s+(.+)$/m); + const typeMatch = content.match(/^Type:\s*(.+)$/m); + const tagsMatch = content.match(/^Tags:\s*(.+)$/m); + const bodyMatch = content.match(/^#.*\n\nType:.*\nTags:.*\n\n([\s\S]*)$/); + + const rawTags = tagsMatch?.[1]?.trim() ?? "(none)"; + const tags = + rawTags.toLowerCase() === "(none)" + ? [] + : rawTags + .split(/\s+/) + .map((tag) => tag.replace(/^#/, "").trim()) + .filter(Boolean); + + return { + title: headingMatch?.[1]?.trim() || fallbackTitle, + type: typeMatch?.[1]?.trim() || "", + tags, + body: bodyMatch?.[1]?.trim() || "" + }; +} + +export function createFragmentDraft(): FragmentItem { + const id = `fragments/new-${Date.now()}`; + return { + id, + label: "New Fragment", + initialContent: "# New Fragment\n\nType: \nTags: (none)\n\n" + }; +} + +export function createFragmentItem(title: string, content: string): FragmentItem { + return { + id: createFragmentId(title), + label: title.trim() || "Untitled Fragment", + initialContent: content + }; +} + +export function updateFragmentItem(items: FragmentItem[], id: string, title: string, content: string): FragmentItem[] { + return items.map((item) => + item.id === id + ? { ...item, label: title.trim() || "Untitled Fragment", initialContent: content } + : item + ); +} + +export function prependFragmentItem(items: FragmentItem[], item: FragmentItem): FragmentItem[] { + return [item, ...items]; +} + +export function removeFragmentItem(items: FragmentItem[], id: string): FragmentItem[] { + return items.filter((item) => item.id !== id); +} + +export async function hydrateFragments(): Promise { + fragmentsBusyStore.set(true); + try { + const items = await listFragments(); + fragmentsStore.set(items.map(dtoToItem)); + } catch (error) { + console.error("[fragments] hydrate:error", error); + throw error; + } finally { + fragmentsBusyStore.set(false); + } +} + +export async function createFragmentFromParsed(payload: ParsedFragment): Promise { + const created = await createFragmentCommand({ + type: payload.type.trim(), + description: composeDescription(payload.title, payload.body), + tags: payload.tags + }); + const item = dtoToItem(created); + fragmentsStore.update((items) => prependFragmentItem(items, item)); + return item; +} + +export async function updateFragmentFromParsed(storeId: string, payload: ParsedFragment): Promise { + const backendId = toBackendId(storeId); + if (!backendId) return null; + + const ok = await updateFragmentCommand(backendId, { + type: payload.type.trim(), + description: composeDescription(payload.title, payload.body), + tags: payload.tags + }); + if (!ok) return null; + + const item: FragmentItem = { + id: storeId, + label: payload.title.trim() || "Untitled Fragment", + initialContent: serializeFragment(payload) + }; + fragmentsStore.update((items) => upsertById(items, item)); + return item; +} + +export async function deleteFragmentByStoreId(storeId: string): Promise { + const backendId = toBackendId(storeId); + if (!backendId) return false; + + const ok = await deleteFragmentCommand(backendId); + if (!ok) return false; + fragmentsStore.update((items) => removeFragmentItem(items, storeId)); + return true; +} + +export function hasFragment(storeId: string): boolean { + return get(fragmentsStore).some((item) => item.id === storeId); +} diff --git a/Journal.App/src/lib/stores/lists.ts b/Journal.App/src/lib/stores/lists.ts new file mode 100644 index 0000000..6213776 --- /dev/null +++ b/Journal.App/src/lib/stores/lists.ts @@ -0,0 +1,118 @@ +import { get, writable } from "svelte/store"; +import { + createList as createListCommand, + deleteList as deleteListCommand, + listLists, + updateList as updateListCommand, + type ListDocumentDto +} from "$lib/backend/lists"; + +export type ListItem = { + id: string; + label: string; + initialContent: string; +}; + +export const listsStore = writable([]); +export const listsBusyStore = writable(false); + +function toStoreId(id: string): string { + return `lists/${id}`; +} + +function toBackendId(id: string): string | null { + const prefix = "lists/"; + if (!id.startsWith(prefix)) return null; + const backendId = id.slice(prefix.length).trim(); + return backendId || null; +} + +function dtoToItem(dto: ListDocumentDto): ListItem { + return { + id: toStoreId(dto.id), + label: dto.label, + initialContent: dto.content || `# ${dto.label}\n\n` + }; +} + +function upsertById(items: ListItem[], next: ListItem): ListItem[] { + const idx = items.findIndex((item) => item.id === next.id); + if (idx === -1) return [next, ...items]; + const clone = [...items]; + clone[idx] = next; + return clone; +} + +export function createListDraft(): ListItem { + const id = `lists/draft-${Date.now()}`; + return { + id, + label: "Untitled List", + initialContent: "# Untitled List\n\n- Item 1" + }; +} + +export async function hydrateLists(): Promise { + listsBusyStore.set(true); + try { + const items = await listLists(); + listsStore.set(items.map(dtoToItem)); + } catch (error) { + console.error("[lists] hydrate:error", error); + throw error; + } finally { + listsBusyStore.set(false); + } +} + +export async function createListFromLabel(label: string, content = ""): Promise { + const resolvedLabel = label.trim() || "Untitled List"; + const resolvedContent = content || `# ${resolvedLabel}\n\n`; + const created = await createListCommand({ label: resolvedLabel, content: resolvedContent }); + const item = dtoToItem(created); + listsStore.update((items) => [item, ...items]); + return item; +} + +export async function updateListByStoreId( + storeId: string, + label?: string, + content?: string +): Promise { + const backendId = toBackendId(storeId); + if (!backendId) return false; + + const payload: { label?: string; content?: string } = {}; + if (label !== undefined) payload.label = label; + if (content !== undefined) payload.content = content; + + const ok = await updateListCommand(backendId, payload); + if (!ok) return false; + + listsStore.update((items) => + items.map((item) => + item.id === storeId + ? { + ...item, + label: label ?? item.label, + initialContent: content ?? item.initialContent + } + : item + ) + ); + return true; +} + +export async function deleteListByStoreId(storeId: string): Promise { + const backendId = toBackendId(storeId); + if (!backendId) return false; + + const ok = await deleteListCommand(backendId); + if (!ok) return false; + listsStore.update((items) => items.filter((item) => item.id !== storeId)); + return true; +} + +export function hasList(storeId: string): boolean { + return get(listsStore).some((item) => item.id === storeId); +} diff --git a/Journal.App/src/lib/stores/session.ts b/Journal.App/src/lib/stores/session.ts new file mode 100644 index 0000000..0d5c803 --- /dev/null +++ b/Journal.App/src/lib/stores/session.ts @@ -0,0 +1,34 @@ +import { writable, get } from "svelte/store"; + +const _password = writable(null); +const _unlocked = writable(false); + +export const vaultUnlocked = { subscribe: _unlocked.subscribe }; + +export function isVaultReady(): boolean { + return get(_unlocked); +} + +export function getSessionPassword(): string | null { + return get(_password); +} + +export function setVaultSession(password: string): void { + _password.set(password); + _unlocked.set(true); +} + +export function clearVaultSession(): void { + _password.set(null); + _unlocked.set(false); +} + +let _flushCallback: (() => Promise) | null = null; + +export function setFlushCallback(fn: () => Promise): void { + _flushCallback = fn; +} + +export async function flushBeforeClose(): Promise { + if (_flushCallback) await _flushCallback(); +} diff --git a/Journal.App/src/lib/stores/settings.ts b/Journal.App/src/lib/stores/settings.ts new file mode 100644 index 0000000..b9b705b --- /dev/null +++ b/Journal.App/src/lib/stores/settings.ts @@ -0,0 +1,160 @@ +import { writable } from "svelte/store"; +import { get } from "svelte/store"; +import { invoke } from "$lib/runtime/invoke"; + +const defaultTags = ["Personal", "Work", "Ideas", "Journal"]; +const defaultFragmentTypes = ["Quote", "Snippet", "Reference"]; +const startupViews = ["entries", "calendar", "fragments", "todos", "lists"] as const; +const defaultStartupView = "entries"; +export type StartupView = typeof startupViews[number]; + +export const settingsTags = writable([...defaultTags]); +export const settingsFragmentTypes = writable([...defaultFragmentTypes]); +export const settingsDefaultStartupView = writable(defaultStartupView); + +let hydrationComplete = false; +let hydrating = false; + +type UiSettingsPayload = { + tags?: string[]; + fragmentTypes?: string[]; + defaultStartupView?: string; +}; + +function normalize(value: string): string { + return value.trim().toLowerCase(); +} + +function hasDuplicate(values: string[], candidate: string, excludeIndex?: number): boolean { + const normalized = normalize(candidate); + return values.some((value, index) => index !== excludeIndex && normalize(value) === normalized); +} + +function normalizeValues(values: string[], fallback: string[]): string[] { + const seen = new Set(); + const result: string[] = []; + for (const value of values) { + const trimmed = value.trim(); + if (!trimmed) continue; + const key = normalize(trimmed); + if (seen.has(key)) continue; + seen.add(key); + result.push(trimmed); + } + return result.length ? result : [...fallback]; +} + +function normalizeStartupView(value: string | undefined): StartupView { + const normalized = (value ?? "").trim().toLowerCase(); + if (startupViews.includes(normalized as StartupView)) { + return normalized as StartupView; + } + return defaultStartupView; +} + +export async function hydrateUiSettings(): Promise { + if (hydrating || hydrationComplete) return; + hydrating = true; + try { + const payload = await invoke("get_ui_settings"); + settingsTags.set(normalizeValues(payload.tags ?? [], defaultTags)); + settingsFragmentTypes.set(normalizeValues(payload.fragmentTypes ?? [], defaultFragmentTypes)); + settingsDefaultStartupView.set(normalizeStartupView(payload.defaultStartupView)); + } catch (error) { + console.error("[settings] hydrate failed", error); + } finally { + hydrating = false; + hydrationComplete = true; + } +} + +export async function persistUiSettings(): Promise { + const tags = normalizeValues(get(settingsTags), defaultTags); + const fragmentTypes = normalizeValues(get(settingsFragmentTypes), defaultFragmentTypes); + const startupView = normalizeStartupView(get(settingsDefaultStartupView)); + settingsTags.set(tags); + settingsFragmentTypes.set(fragmentTypes); + settingsDefaultStartupView.set(startupView); + + await invoke("set_ui_settings", { + tags, + fragmentTypes, + fragment_types: fragmentTypes, + defaultStartupView: startupView, + default_startup_view: startupView + }); +} + +function queuePersist(): void { + if (!hydrationComplete || hydrating) return; + void persistUiSettings().catch((error) => { + console.error("[settings] persist failed", error); + }); +} + +export function addSettingsTag(value: string): boolean { + const next = value.trim(); + if (!next) return false; + const tags = get(settingsTags); + if (hasDuplicate(tags, next)) return false; + settingsTags.set([...tags, next]); + queuePersist(); + return true; +} + +export function updateSettingsTag(index: number, value: string): boolean { + const next = value.trim(); + if (!next) return false; + const tags = get(settingsTags); + if (index < 0 || index >= tags.length) return false; + if (hasDuplicate(tags, next, index)) return false; + settingsTags.set(tags.map((tag, idx) => (idx === index ? next : tag))); + queuePersist(); + return true; +} + +export function removeSettingsTag(index: number): boolean { + const tags = get(settingsTags); + if (index < 0 || index >= tags.length) return false; + settingsTags.set(tags.filter((_, idx) => idx !== index)); + queuePersist(); + return true; +} + +export function addFragmentType(value: string): boolean { + const next = value.trim(); + if (!next) return false; + const types = get(settingsFragmentTypes); + if (hasDuplicate(types, next)) return false; + settingsFragmentTypes.set([...types, next]); + queuePersist(); + return true; +} + +export function updateFragmentType(index: number, value: string): boolean { + const next = value.trim(); + if (!next) return false; + const types = get(settingsFragmentTypes); + if (index < 0 || index >= types.length) return false; + if (hasDuplicate(types, next, index)) return false; + settingsFragmentTypes.set(types.map((type, idx) => (idx === index ? next : type))); + queuePersist(); + return true; +} + +export function removeFragmentType(index: number): boolean { + const types = get(settingsFragmentTypes); + if (index < 0 || index >= types.length) return false; + settingsFragmentTypes.set(types.filter((_, idx) => idx !== index)); + queuePersist(); + return true; +} + +export function setDefaultStartupView(value: string): boolean { + const next = normalizeStartupView(value); + if (get(settingsDefaultStartupView) === next) return false; + settingsDefaultStartupView.set(next); + queuePersist(); + return true; +} + diff --git a/Journal.App/src/lib/stores/todos.ts b/Journal.App/src/lib/stores/todos.ts new file mode 100644 index 0000000..20c4d43 --- /dev/null +++ b/Journal.App/src/lib/stores/todos.ts @@ -0,0 +1,267 @@ +import { get, writable } from "svelte/store"; +import { + createTodoItem as createTodoItemCommand, + createTodoList as createTodoListCommand, + deleteTodoItem as deleteTodoItemCommand, + deleteTodoList as deleteTodoListCommand, + listTodoLists, + updateTodoItem as updateTodoItemCommand, + updateTodoList as updateTodoListCommand, + type TodoListDto +} from "$lib/backend/todos"; + +// TodoItem keeps a numeric `id` for local array operations (used by EditorPanel) +// plus a `backendId` (guid string) for backend persistence. +export type TodoItem = { id: number; text: string; done: boolean; backendId?: string }; +export type TodoListMeta = { id: string; label: string; backendId?: string }; + +export const todoListsStore = writable([]); +export const todosStore = writable>({}); +export const todosBusyStore = writable(false); + +// ── ID helpers ─────────────────────────────────────────────────── + +function toStoreId(guid: string): string { + return `todos/${guid}`; +} + +function toBackendId(storeId: string): string | null { + const prefix = "todos/"; + if (!storeId.startsWith(prefix)) return null; + const backendId = storeId.slice(prefix.length).trim(); + return backendId || null; +} + +export function createTodoId(): number { + return Date.now() + Math.floor(Math.random() * 1000); +} + +// ── DTO mapping ────────────────────────────────────────────────── + +function dtoToMeta(dto: TodoListDto): TodoListMeta { + return { + id: toStoreId(dto.id), + label: dto.label, + backendId: dto.id + }; +} + +function dtoToItems(dto: TodoListDto): TodoItem[] { + return dto.items.map((item, index) => ({ + id: createTodoId() + index, + text: item.text, + done: item.done, + backendId: item.id + })); +} + +// ── Hydration ──────────────────────────────────────────────────── + +export async function hydrateTodos(): Promise { + todosBusyStore.set(true); + try { + const lists = await listTodoLists(); + + const metas: TodoListMeta[] = lists.map(dtoToMeta); + const items: Record = {}; + for (const dto of lists) { + items[toStoreId(dto.id)] = dtoToItems(dto); + } + + todoListsStore.set(metas); + todosStore.set(items); + } catch (error) { + console.error("[todos] hydrate:error", error); + throw error; + } finally { + todosBusyStore.set(false); + } +} + +// ── List CRUD ──────────────────────────────────────────────────── + +export async function createTodoListFromLabel( + label: string +): Promise<{ meta: TodoListMeta; items: TodoItem[] }> { + const resolvedLabel = label.trim() || "New List"; + const created = await createTodoListCommand({ label: resolvedLabel }); + + const meta = dtoToMeta(created); + todoListsStore.update((metas) => [meta, ...metas]); + todosStore.update((lists) => ({ ...lists, [meta.id]: [] })); + return { meta, items: [] }; +} + +export async function deleteTodoListByStoreId(storeId: string): Promise { + const backendId = toBackendId(storeId); + if (!backendId) return false; + + const ok = await deleteTodoListCommand(backendId); + if (!ok) return false; + + todoListsStore.update((metas) => metas.filter((m) => m.id !== storeId)); + todosStore.update((lists) => { + const { [storeId]: _, ...rest } = lists; + return rest; + }); + return true; +} + +// ── Item CRUD (backend-backed) ─────────────────────────────────── + +export async function addTodoItemBackend( + storeId: string, + text: string +): Promise { + const backendListId = toBackendId(storeId); + if (!backendListId || !text.trim()) return null; + + const items = get(todosStore)[storeId] ?? []; + const sortOrder = items.length; + + const created = await createTodoItemCommand({ + listId: backendListId, + text: text.trim(), + sortOrder + }); + + const item: TodoItem = { + id: createTodoId(), + text: created.text, + done: created.done, + backendId: created.id + }; + + todosStore.update((lists) => ({ + ...lists, + [storeId]: [item, ...(lists[storeId] ?? [])] + })); + return item; +} + +export async function toggleTodoItemBackend( + storeId: string, + localId: number +): Promise { + const items = get(todosStore)[storeId]; + const todo = items?.find((t) => t.id === localId); + if (!todo?.backendId) return false; + + const ok = await updateTodoItemCommand(todo.backendId, { done: !todo.done }); + if (!ok) return false; + + todosStore.update((lists) => ({ + ...lists, + [storeId]: (lists[storeId] ?? []).map((t) => + t.id === localId ? { ...t, done: !t.done } : t + ) + })); + return true; +} + +export async function updateTodoItemTextBackend( + storeId: string, + localId: number, + text: string +): Promise { + const items = get(todosStore)[storeId]; + const todo = items?.find((t) => t.id === localId); + if (!todo?.backendId || !text.trim()) return false; + + const ok = await updateTodoItemCommand(todo.backendId, { text: text.trim() }); + if (!ok) return false; + + todosStore.update((lists) => ({ + ...lists, + [storeId]: (lists[storeId] ?? []).map((t) => + t.id === localId ? { ...t, text: text.trim() } : t + ) + })); + return true; +} + +export async function removeTodoItemBackend( + storeId: string, + localId: number +): Promise { + const items = get(todosStore)[storeId]; + const todo = items?.find((t) => t.id === localId); + if (!todo?.backendId) return false; + + const ok = await deleteTodoItemCommand(todo.backendId); + if (!ok) return false; + + todosStore.update((lists) => ({ + ...lists, + [storeId]: (lists[storeId] ?? []).filter((t) => t.id !== localId) + })); + return true; +} + +// ── Pure helpers (used by EditorPanel for local state) ─────────── + +export function serializeTodoList(title: string, todos: TodoItem[]): string { + const heading = title?.trim() ? `# ${title}` : "# To-Do List"; + const lines = todos.map((todo) => `- [${todo.done ? "x" : " "}] ${todo.text}`); + return `${heading}\n\n${lines.join("\n")}`; +} + +export function parseTodoList(content: string): TodoItem[] { + const lines = content.replace(/\r\n/g, "\n").split("\n"); + const parsed: TodoItem[] = []; + for (const line of lines) { + const match = line.match(/^- \[( |x)\]\s+(.+)$/i); + if (!match) continue; + parsed.push({ + id: createTodoId(), + text: match[2].trim(), + done: match[1].toLowerCase() === "x" + }); + } + return parsed; +} + +export function getOrCreateTodoList( + lists: Record, + documentId: string, + fallbackContent: string +): { lists: Record; todos: TodoItem[] } { + const existing = lists[documentId]; + if (existing) { + return { lists, todos: existing }; + } + const parsed = parseTodoList(fallbackContent); + return { lists: { ...lists, [documentId]: parsed }, todos: parsed }; +} + +export function setTodoList( + lists: Record, + documentId: string, + todos: TodoItem[] +): Record { + return { ...lists, [documentId]: todos }; +} + +export function addTodoItem(todos: TodoItem[], text: string): TodoItem[] { + return [{ id: createTodoId(), text: text.trim(), done: false }, ...todos]; +} + +export function toggleTodoItem(todos: TodoItem[], id: number): TodoItem[] { + return todos.map((todo) => (todo.id === id ? { ...todo, done: !todo.done } : todo)); +} + +export function updateTodoItemText(todos: TodoItem[], id: number, text: string): TodoItem[] { + return todos.map((todo) => (todo.id === id ? { ...todo, text: text.trim() } : todo)); +} + +export function removeTodoItem(todos: TodoItem[], id: number): TodoItem[] { + return todos.filter((todo) => todo.id !== id); +} + +export function createTodoListDraft(): { meta: TodoListMeta; items: TodoItem[] } { + const id = `todos/draft-${Date.now()}`; + return { + meta: { id, label: "New List" }, + items: [] + }; +} diff --git a/Journal.App/src/lib/utils/markdown.ts b/Journal.App/src/lib/utils/markdown.ts new file mode 100644 index 0000000..a1377c7 --- /dev/null +++ b/Journal.App/src/lib/utils/markdown.ts @@ -0,0 +1,119 @@ +export function escapeHtml(input: string): string { + return input + .replaceAll("&", "&") + .replaceAll("<", "<") + .replaceAll(">", ">") + .replaceAll('"', """) + .replaceAll("'", "'"); +} + +export function parseInline(input: string): string { + let value = escapeHtml(input); + value = value.replace(/`([^`]+)`/g, "$1"); + value = value.replace(/\*\*([^*]+)\*\*/g, "$1"); + value = value.replace(/\*([^*]+)\*/g, "$1"); + value = value.replace( + /\[([^\]]+)\]\((journal:[^\s)]+)\)/g, + '
$1' + ); + value = value.replace( + /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g, + '$1' + ); + return value; +} + +export function renderMarkdown(markdown: string): string { + const lines = markdown.replace(/\r\n/g, "\n").split("\n"); + const output: string[] = []; + let i = 0; + let inCode = false; + let codeLines: string[] = []; + + while (i < lines.length) { + const line = lines[i]; + const trimmed = line.trim(); + + if (trimmed.startsWith("```")) { + if (inCode) { + output.push(`
${escapeHtml(codeLines.join("\n"))}
`); + codeLines = []; + inCode = false; + } else { + inCode = true; + } + i += 1; + continue; + } + + if (inCode) { + codeLines.push(line); + i += 1; + continue; + } + + if (!trimmed) { + i += 1; + continue; + } + + const heading = trimmed.match(/^(#{1,6})\s+(.*)$/); + if (heading) { + const level = heading[1].length; + output.push(`${parseInline(heading[2])}`); + i += 1; + continue; + } + + if (/^[-*+]\s+/.test(trimmed)) { + const items: string[] = []; + while (i < lines.length && /^[-*+]\s+/.test(lines[i].trim())) { + items.push(`
  • ${parseInline(lines[i].trim().replace(/^[-*+]\s+/, ""))}
  • `); + i += 1; + } + output.push(`
      ${items.join("")}
    `); + continue; + } + + if (/^\d+\.\s+/.test(trimmed)) { + const items: string[] = []; + while (i < lines.length && /^\d+\.\s+/.test(lines[i].trim())) { + items.push(`
  • ${parseInline(lines[i].trim().replace(/^\d+\.\s+/, ""))}
  • `); + i += 1; + } + output.push(`
      ${items.join("")}
    `); + continue; + } + + if (/^>\s+/.test(trimmed)) { + output.push(`
    ${parseInline(trimmed.replace(/^>\s+/, ""))}
    `); + i += 1; + continue; + } + + if (/^(-{3,}|\*{3,})$/.test(trimmed)) { + output.push("
    "); + i += 1; + continue; + } + + const paragraph: string[] = []; + while (i < lines.length && lines[i].trim()) { + paragraph.push(lines[i].trim()); + i += 1; + } + output.push(`

    ${parseInline(paragraph.join(" "))}

    `); + } + + if (inCode) { + output.push(`
    ${escapeHtml(codeLines.join("\n"))}
    `); + } + + return output.join(""); +} + +export function extractEditorTitle(markdown: string, fallback: string): string { + const firstLine = markdown.replace(/\r\n/g, "\n").split("\n")[0]?.trim() ?? ""; + const headingMatch = firstLine.match(/^#\s+(.+)$/); + return headingMatch ? headingMatch[1] : fallback; +} diff --git a/Journal.App/src/routes/+layout.svelte b/Journal.App/src/routes/+layout.svelte new file mode 100644 index 0000000..8e2ee39 --- /dev/null +++ b/Journal.App/src/routes/+layout.svelte @@ -0,0 +1,72 @@ + + + diff --git a/Journal.App/src/routes/+layout.ts b/Journal.App/src/routes/+layout.ts new file mode 100644 index 0000000..9d24899 --- /dev/null +++ b/Journal.App/src/routes/+layout.ts @@ -0,0 +1,5 @@ +// 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 +export const ssr = false; diff --git a/Journal.App/src/routes/+page.svelte b/Journal.App/src/routes/+page.svelte new file mode 100644 index 0000000..7ad2b5c --- /dev/null +++ b/Journal.App/src/routes/+page.svelte @@ -0,0 +1,575 @@ + + +
    + + {#if panelOpen} + { + calendarPanelState = state; + }} + /> + {/if} + +
    + + + + diff --git a/Journal.App/src/routes/settings/+page.svelte b/Journal.App/src/routes/settings/+page.svelte new file mode 100644 index 0000000..38490d7 --- /dev/null +++ b/Journal.App/src/routes/settings/+page.svelte @@ -0,0 +1,675 @@ + + +
    + + +
    +
    +
    +

    Settings

    +

    Configure app behavior and interface options.

    +
    + +
    + +
    +
    +
    +

    + + Startup +

    +
    + +
    + +
    +
    +

    + + Tags +

    +

    Add and manage tags used for notes and entries.

    +
    + +
    + event.key === "Enter" && addTag()} + /> + +
    + +
      + {#each $settingsTags as tag, index} +
    • + {#if editingTagIndex === index} + { + if (event.key === "Enter") saveEditTag(); + if (event.key === "Escape") cancelEditTag(); + }} + /> +
      + + +
      + {:else} + {tag} +
      + + +
      + {/if} +
    • + {/each} +
    +
    + +
    +
    +

    + + Fragment Types +

    +

    Configure custom fragment types for the Fragments section.

    +
    + +
    + event.key === "Enter" && addFragmentTypeLocal()} + /> + +
    + +
      + {#each $settingsFragmentTypes as type, index} +
    • + {#if editingFragmentTypeIndex === index} + { + if (event.key === "Enter") saveEditFragmentType(); + if (event.key === "Escape") cancelEditFragmentType(); + }} + /> +
      + + +
      + {:else} + {type} +
      + + +
      + {/if} +
    • + {/each} +
    +
    + +
    +
    +

    + + Sidecar +

    +

    Root directory containing the Journal.Sidecar project.

    +
    + +
    + event.key === "Enter" && saveSidecarRoot()} + /> + + {#if sidecarRootIsCustom} + + {/if} +
    + + {#if sidecarRootError} +

    {sidecarRootError}

    + {/if} +
    +
    +
    +
    + + + + + diff --git a/Journal.App/static/favicon.png b/Journal.App/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..825b9e65af7c104cfb07089bb28659393b4f2097 GIT binary patch literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>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nx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH .side-panel { + grid-column: 2; + grid-row: 1; + } + + .app-shell:not(.panel-closed) > .editor-panel { + grid-column: 2; + grid-row: 2; + } +} diff --git a/Journal.App/static/svelte.svg b/Journal.App/static/svelte.svg new file mode 100644 index 0000000..c5e0848 --- /dev/null +++ b/Journal.App/static/svelte.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Journal.App/static/tauri.svg b/Journal.App/static/tauri.svg new file mode 100644 index 0000000..31b62c9 --- /dev/null +++ b/Journal.App/static/tauri.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Journal.App/static/vite.svg b/Journal.App/static/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/Journal.App/static/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Journal.App/svelte.config.js b/Journal.App/svelte.config.js new file mode 100644 index 0000000..a7830ea --- /dev/null +++ b/Journal.App/svelte.config.js @@ -0,0 +1,18 @@ +// 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/Journal.App/tsconfig.json b/Journal.App/tsconfig.json new file mode 100644 index 0000000..f4d0a0e --- /dev/null +++ b/Journal.App/tsconfig.json @@ -0,0 +1,19 @@ +{ + "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 +} diff --git a/Journal.App/vite.config.js b/Journal.App/vite.config.js new file mode 100644 index 0000000..3ecfa0a --- /dev/null +++ b/Journal.App/vite.config.js @@ -0,0 +1,32 @@ +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; + +// https://vite.dev/config/ +export default defineConfig(async () => ({ + plugins: [sveltekit()], + + // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` + // + // 1. prevent Vite from obscuring rust errors + clearScreen: false, + // 2. tauri expects a fixed port, fail if that port is not available + server: { + port: 1420, + strictPort: true, + host: host || false, + hmr: host + ? { + protocol: "ws", + host, + port: 1421, + } + : undefined, + watch: { + // 3. tell Vite to ignore watching `src-tauri` + ignored: ["**/src-tauri/**"], + }, + }, +})); diff --git a/Journal.Core/Dtos/AiDtos.cs b/Journal.Core/Dtos/AiDtos.cs new file mode 100644 index 0000000..964498e --- /dev/null +++ b/Journal.Core/Dtos/AiDtos.cs @@ -0,0 +1,7 @@ +namespace Journal.Core.Dtos; + +public sealed record AiHealthDto( + string Provider, + bool Enabled, + bool Healthy, + string Message); diff --git a/Journal.Core/Dtos/CommandDtos.cs b/Journal.Core/Dtos/CommandDtos.cs new file mode 100644 index 0000000..e84f832 --- /dev/null +++ b/Journal.Core/Dtos/CommandDtos.cs @@ -0,0 +1,41 @@ +namespace Journal.Core.Dtos; + +internal sealed record VaultInitializePayload(string Password, string VaultDirectory); +internal sealed record VaultPayload(string Password, string VaultDirectory, string DataDirectory, string? NowUtc = null); +internal sealed record ClearDataPayload(string DataDirectory); +internal sealed record EntryListPayload(string? DataDirectory = null); +internal sealed record EntryLoadPayload(string FilePath); +public sealed record EntrySavePayload(string Content, string? FilePath = null, string? Mode = null, string? FileName = null); +public sealed record EntryListItem(string FileName, string FilePath); +public sealed record EntryLoadResult(string FileName, string FilePath, JournalEntryDto Entry); +public sealed record EntrySaveResult(string FilePath); +internal sealed record EntryDeletePayload(string FilePath); +internal sealed record EntryTemplateListPayload(string? DataDirectory = null); +internal sealed record EntryTemplateLoadPayload(string FilePath); +internal sealed record EntryTemplateDeletePayload(string FilePath); +public sealed record EntryTemplateLoadResult(string FileName, string FilePath, string Content); +public sealed record EntryTemplateSavePayload(string Name, string Content, string? FilePath = null, string? DataDirectory = null); +internal sealed record DatabasePayload(string Password, string? DataDirectory = null); +internal sealed record AiSummarizeEntryPayload(string Content, string? FileStem = null); +internal sealed record AiSummarizeAllPayload(List? Entries); +internal sealed record AiChatPayload(string Prompt); +internal sealed record AiEmbedPayload(string Content); +internal sealed record SpeechTranscribePayload( + string? AudioBase64 = null, + string? Audio_Base64 = null, + string? Engine = null, + string? WhisperModel = null, + string? Whisper_Model = null, + string? Text = null, + int? SimulateDelayMs = null, + int? Simulate_Delay_Ms = null); +internal sealed record SearchEntriesPayload( + string DataDirectory, + string? Query = null, + string? Section = null, + string? StartDate = null, + string? EndDate = null, + List? Tags = null, + List? Types = null, + List? Checked = null, + List? Unchecked = null); diff --git a/Journal.Core/Dtos/DatabaseDtos.cs b/Journal.Core/Dtos/DatabaseDtos.cs new file mode 100644 index 0000000..3c587e7 --- /dev/null +++ b/Journal.Core/Dtos/DatabaseDtos.cs @@ -0,0 +1,18 @@ +namespace Journal.Core.Dtos; + +public sealed record JournalDatabaseStatus( + string DatabasePath, + int KeyLengthBytes, + int Iterations, + string KeyDerivation, + IReadOnlyList SchemaTables, + string SchemaBootstrapPath, + bool RuntimeReady, + string RuntimeMessage); + +public sealed record JournalDatabaseHydrationResult( + string DatabasePath, + string SchemaBootstrapPath, + int EntryFilesProcessed, + bool RuntimeReady, + string Message); diff --git a/Journal.Core/Dtos/EntrySearchDtos.cs b/Journal.Core/Dtos/EntrySearchDtos.cs new file mode 100644 index 0000000..7330901 --- /dev/null +++ b/Journal.Core/Dtos/EntrySearchDtos.cs @@ -0,0 +1,16 @@ +namespace Journal.Core.Dtos; + +public sealed record EntrySearchRequestDto( + string DataDirectory, + string? Query = null, + string? Section = null, + string? StartDate = null, + string? EndDate = null, + IReadOnlyList? Tags = null, + IReadOnlyList? Types = null, + IReadOnlyList? Checked = null, + IReadOnlyList? Unchecked = null); + +public sealed record EntrySearchResultDto( + string FileName, + JournalEntryDto Entry); diff --git a/Journal.Core/Dtos/FragmentDtos.cs b/Journal.Core/Dtos/FragmentDtos.cs new file mode 100644 index 0000000..aace939 --- /dev/null +++ b/Journal.Core/Dtos/FragmentDtos.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; + +namespace Journal.Core.Dtos; + +public record FragmentDto( + Guid Id, + string Type, + string Description, + DateTimeOffset Time, + List Tags +); + +public record CreateFragmentDto( + [property: Required(AllowEmptyStrings = false)] string Type, + [property: Required(AllowEmptyStrings = false)] string Description, + List? Tags = null +); + +public record UpdateFragmentDto( + string? Type = null, + string? Description = null, + List? Tags = null, + DateTimeOffset? Time = null +); diff --git a/Journal.Core/Dtos/JournalEntryDtos.cs b/Journal.Core/Dtos/JournalEntryDtos.cs new file mode 100644 index 0000000..4011700 --- /dev/null +++ b/Journal.Core/Dtos/JournalEntryDtos.cs @@ -0,0 +1,12 @@ +namespace Journal.Core.Dtos; + +public sealed record ParsedSectionDto( + string Title, + IReadOnlyList Content, + IReadOnlyDictionary Checkboxes); + +public sealed record JournalEntryDto( + string Date, + IReadOnlyList Fragments, + string RawContent, + IReadOnlyDictionary Sections); diff --git a/Journal.Core/Dtos/ListDtos.cs b/Journal.Core/Dtos/ListDtos.cs new file mode 100644 index 0000000..ef742bc --- /dev/null +++ b/Journal.Core/Dtos/ListDtos.cs @@ -0,0 +1,21 @@ +using System.ComponentModel.DataAnnotations; + +namespace Journal.Core.Dtos; + +public record ListDocumentDto( + Guid Id, + string Label, + string Content, + DateTimeOffset CreatedAt, + DateTimeOffset UpdatedAt +); + +public record CreateListDto( + [property: Required(AllowEmptyStrings = false)] string Label, + string? Content = null +); + +public record UpdateListDto( + string? Label = null, + string? Content = null +); diff --git a/Journal.Core/Dtos/SpeechDtos.cs b/Journal.Core/Dtos/SpeechDtos.cs new file mode 100644 index 0000000..aa3d1c9 --- /dev/null +++ b/Journal.Core/Dtos/SpeechDtos.cs @@ -0,0 +1,21 @@ +namespace Journal.Core.Dtos; + +public sealed record SpeechDeviceDto( + int Index, + string Name); + +public sealed record SpeechDevicesResultDto( + IReadOnlyList Devices, + string? Warning = null); + +public sealed record SpeechTranscribeRequestDto( + string? AudioBase64 = null, + string? Engine = null, + string? WhisperModel = null, + string? Text = null, + int? SimulateDelayMs = null); + +public sealed record SpeechTranscribeResultDto( + string Text, + string Engine, + string? Warning = null); diff --git a/Journal.Core/Dtos/TodoDtos.cs b/Journal.Core/Dtos/TodoDtos.cs new file mode 100644 index 0000000..c84a140 --- /dev/null +++ b/Journal.Core/Dtos/TodoDtos.cs @@ -0,0 +1,38 @@ +using System.ComponentModel.DataAnnotations; + +namespace Journal.Core.Dtos; + +public record TodoListDto( + Guid Id, + string Label, + DateTimeOffset CreatedAt, + List Items +); + +public record TodoItemDto( + Guid Id, + Guid ListId, + string Text, + bool Done, + int SortOrder +); + +public record CreateTodoListDto( + [property: Required(AllowEmptyStrings = false)] string Label +); + +public record UpdateTodoListDto( + string? Label = null +); + +public record CreateTodoItemDto( + [property: Required] Guid ListId, + [property: Required(AllowEmptyStrings = false)] string Text, + int? SortOrder = null +); + +public record UpdateTodoItemDto( + string? Text = null, + bool? Done = null, + int? SortOrder = null +); diff --git a/Journal.Core/Entry.cs b/Journal.Core/Entry.cs new file mode 100644 index 0000000..6430c2f --- /dev/null +++ b/Journal.Core/Entry.cs @@ -0,0 +1,494 @@ +using System.ComponentModel.DataAnnotations; +using System.Globalization; +using System.Text.Json; +using Journal.Core.Dtos; +using Journal.Core.Models; +using Journal.Core.Services.Ai; +using Journal.Core.Services.Config; +using Journal.Core.Services.Database; +using Journal.Core.Services.Entries; +using Journal.Core.Services.Fragments; +using Journal.Core.Services.Lists; +using Journal.Core.Services.Logging; +using Journal.Core.Services.Speech; +using Journal.Core.Services.Todos; +using Journal.Core.Services.Vault; + +namespace Journal.Core; + +public class Entry( + IFragmentService fragments, + IEntrySearchService entrySearch, + IVaultStorageService vaultStorage, + IJournalDatabaseService database, + IDatabaseSessionService databaseSession, + IJournalConfigService config, + IAiService ai, + ISpeechBridgeService speech, + IEntryFileService entryFiles, + IListService lists, + ITodoService todos, + CommandLogger logger) +{ + private readonly IFragmentService _fragments = fragments; + private readonly IEntrySearchService _entrySearch = entrySearch; + private readonly IVaultStorageService _vaultStorage = vaultStorage; + private readonly IJournalDatabaseService _database = database; + private readonly IDatabaseSessionService _databaseSession = databaseSession; + private readonly IJournalConfigService _config = config; + private readonly IAiService _ai = ai; + private readonly ISpeechBridgeService _speech = speech; + private readonly IEntryFileService _entryFiles = entryFiles; + private readonly IListService _lists = lists; + private readonly ITodoService _todos = todos; + private readonly CommandLogger _logger = logger; + private static readonly HashSet VaultSyncActions = new(StringComparer.Ordinal) + { + "entries.save", + "entries.delete", + "templates.save", + "templates.delete", + "fragments.create", + "fragments.update", + "fragments.delete", + "lists.create", + "lists.update", + "lists.delete", + "todos.create", + "todos.update", + "todos.delete", + "todos.items.create", + "todos.items.update", + "todos.items.delete" + }; + private static readonly JsonSerializerOptions JsonOptions = new() + { + PropertyNameCaseInsensitive = true + }; + + public async Task RunAsync() + { + string? line; + while ((line = Console.ReadLine()) is not null) + { + var response = await HandleCommandAsync(line); + Console.WriteLine(response); + } + } + + public async Task HandleCommandAsync(string json) + { + if (string.IsNullOrWhiteSpace(json)) + return Error("Invalid command"); + + Command? cmd; + try + { + cmd = JsonSerializer.Deserialize(json, JsonOptions); + } + catch (JsonException) + { + return Error("Invalid command JSON"); + } + + if (cmd is null || string.IsNullOrWhiteSpace(cmd.Action)) + return Error("Invalid command"); + + var action = cmd.Action.Trim(); + var correlationId = string.IsNullOrWhiteSpace(cmd.CorrelationId) + ? Guid.NewGuid().ToString("N") + : cmd.CorrelationId.Trim(); + CommandLogger.LogStart(action, correlationId, cmd.Payload); + object? result; + + try + { + switch (action) + { + case "fragments.list": + result = _fragments.GetAll(); + break; + case "fragments.get": + if (!Guid.TryParse(cmd.Id, out var getId)) + return Error("Invalid or missing id"); + result = _fragments.GetById(getId); + break; + case "fragments.create": + var createDto = DeserializePayload(cmd.Payload); + if (createDto is null) + return Error("Missing or invalid payload"); + result = _fragments.Create(createDto); + break; + case "fragments.update": + if (!Guid.TryParse(cmd.Id, out var updateId)) + return Error("Invalid or missing id"); + var updateDto = DeserializePayload(cmd.Payload); + if (updateDto is null) + return Error("Missing or invalid payload"); + result = _fragments.Update(updateId, updateDto); + break; + case "fragments.delete": + if (!Guid.TryParse(cmd.Id, out var deleteId)) + return Error("Invalid or missing id"); + result = _fragments.Remove(deleteId); + break; + case "fragments.search": + result = _fragments.Search(cmd.Type, cmd.Tag); + break; + + // ── Lists ──────────────────────────────────────── + case "lists.list": + result = _lists.GetAll(); + break; + case "lists.get": + if (!Guid.TryParse(cmd.Id, out var getListId)) + return Error("Invalid or missing id"); + result = _lists.GetById(getListId); + break; + case "lists.create": + var createListDto = DeserializePayload(cmd.Payload); + if (createListDto is null) + return Error("Missing or invalid payload"); + result = _lists.Create(createListDto); + break; + case "lists.update": + if (!Guid.TryParse(cmd.Id, out var updateListId)) + return Error("Invalid or missing id"); + var updateListDto = DeserializePayload(cmd.Payload); + if (updateListDto is null) + return Error("Missing or invalid payload"); + result = _lists.Update(updateListId, updateListDto); + break; + case "lists.delete": + if (!Guid.TryParse(cmd.Id, out var deleteListId)) + return Error("Invalid or missing id"); + result = _lists.Remove(deleteListId); + break; + + // ── Todos ──────────────────────────────────────── + case "todos.list": + result = _todos.GetAllLists(); + break; + case "todos.get": + if (!Guid.TryParse(cmd.Id, out var getTodoListId)) + return Error("Invalid or missing id"); + result = _todos.GetListById(getTodoListId); + break; + case "todos.create": + var createTodoListDto = DeserializePayload(cmd.Payload); + if (createTodoListDto is null) + return Error("Missing or invalid payload"); + result = _todos.CreateList(createTodoListDto); + break; + case "todos.update": + if (!Guid.TryParse(cmd.Id, out var updateTodoListId)) + return Error("Invalid or missing id"); + var updateTodoListDto = DeserializePayload(cmd.Payload); + if (updateTodoListDto is null) + return Error("Missing or invalid payload"); + result = _todos.UpdateList(updateTodoListId, updateTodoListDto); + break; + case "todos.delete": + if (!Guid.TryParse(cmd.Id, out var deleteTodoListId)) + return Error("Invalid or missing id"); + result = _todos.RemoveList(deleteTodoListId); + break; + case "todos.items.create": + var createItemDto = DeserializePayload(cmd.Payload); + if (createItemDto is null) + return Error("Missing or invalid payload"); + result = _todos.CreateItem(createItemDto); + break; + case "todos.items.update": + if (!Guid.TryParse(cmd.Id, out var updateItemId)) + return Error("Invalid or missing id"); + var updateItemDto = DeserializePayload(cmd.Payload); + if (updateItemDto is null) + return Error("Missing or invalid payload"); + result = _todos.UpdateItem(updateItemId, updateItemDto); + break; + case "todos.items.delete": + if (!Guid.TryParse(cmd.Id, out var deleteItemId)) + return Error("Invalid or missing id"); + result = _todos.RemoveItem(deleteItemId); + break; + case "search.entries": + var searchPayload = DeserializePayload(cmd.Payload); + if (searchPayload is null || string.IsNullOrWhiteSpace(searchPayload.DataDirectory)) + return Error("Missing or invalid payload"); + var searchRequest = new EntrySearchRequestDto( + DataDirectory: searchPayload.DataDirectory, + Query: searchPayload.Query, + Section: searchPayload.Section, + StartDate: searchPayload.StartDate, + EndDate: searchPayload.EndDate, + Tags: searchPayload.Tags, + Types: searchPayload.Types, + Checked: searchPayload.Checked, + Unchecked: searchPayload.Unchecked); + result = await _entrySearch.SearchEntriesAsync(searchRequest); + break; + case "entries.list": + var listPayload = DeserializePayload(cmd.Payload); + var listDataDirectory = !string.IsNullOrWhiteSpace(listPayload?.DataDirectory) + ? listPayload.DataDirectory + : _config.Current.DataDirectory; + result = _entryFiles.ListEntries(listDataDirectory); + break; + case "templates.list": + var templateListPayload = DeserializePayload(cmd.Payload); + var templateListDirectory = !string.IsNullOrWhiteSpace(templateListPayload?.DataDirectory) + ? templateListPayload.DataDirectory + : _config.Current.DataDirectory; + result = _entryFiles.ListTemplates(templateListDirectory); + break; + case "entries.load": + var loadEntryPayload = DeserializePayload(cmd.Payload); + if (loadEntryPayload is null || string.IsNullOrWhiteSpace(loadEntryPayload.FilePath)) + return Error("Missing or invalid payload"); + result = _entryFiles.LoadEntry(loadEntryPayload.FilePath); + break; + case "templates.load": + var loadTemplatePayload = DeserializePayload(cmd.Payload); + if (loadTemplatePayload is null || string.IsNullOrWhiteSpace(loadTemplatePayload.FilePath)) + return Error("Missing or invalid payload"); + result = _entryFiles.LoadTemplate(loadTemplatePayload.FilePath); + break; + case "entries.save": + var saveEntryPayload = DeserializePayload(cmd.Payload); + if (saveEntryPayload is null || string.IsNullOrWhiteSpace(saveEntryPayload.Content)) + return Error("Missing or invalid payload"); + result = _entryFiles.SaveEntry(saveEntryPayload, _config.Current.DataDirectory); + break; + case "templates.save": + var saveTemplatePayload = DeserializePayload(cmd.Payload); + if (saveTemplatePayload is null || string.IsNullOrWhiteSpace(saveTemplatePayload.Name)) + return Error("Missing or invalid payload"); + result = _entryFiles.SaveTemplate(saveTemplatePayload, _config.Current.DataDirectory); + break; + case "entries.delete": + var deleteEntryPayload = DeserializePayload(cmd.Payload); + if (deleteEntryPayload is null || string.IsNullOrWhiteSpace(deleteEntryPayload.FilePath)) + return Error("Missing or invalid payload"); + result = _entryFiles.DeleteEntry(deleteEntryPayload.FilePath); + break; + case "templates.delete": + var deleteTemplatePayload = DeserializePayload(cmd.Payload); + if (deleteTemplatePayload is null || string.IsNullOrWhiteSpace(deleteTemplatePayload.FilePath)) + return Error("Missing or invalid payload"); + result = _entryFiles.DeleteTemplate(deleteTemplatePayload.FilePath); + break; + case "config.get": + result = _config.Current; + break; + case "ai.health": + result = await _ai.HealthAsync(); + break; + case "ai.summarize_entry": + var summarizeEntryPayload = DeserializePayload(cmd.Payload); + if (summarizeEntryPayload is null || string.IsNullOrWhiteSpace(summarizeEntryPayload.Content)) + return Error("Missing or invalid payload"); + result = await _ai.SummarizeEntryAsync(summarizeEntryPayload.Content, summarizeEntryPayload.FileStem); + break; + case "ai.summarize_all": + var summarizeAllPayload = DeserializePayload(cmd.Payload); + if (summarizeAllPayload is null) + return Error("Missing or invalid payload"); + result = await _ai.SummarizeAllAsync(summarizeAllPayload.Entries ?? []); + break; + case "ai.chat": + var chatPayload = DeserializePayload(cmd.Payload); + if (chatPayload is null || string.IsNullOrWhiteSpace(chatPayload.Prompt)) + return Error("Missing or invalid payload"); + result = await _ai.ChatAsync(chatPayload.Prompt); + break; + case "ai.embed": + var embedPayload = DeserializePayload(cmd.Payload); + if (embedPayload is null || string.IsNullOrWhiteSpace(embedPayload.Content)) + return Error("Missing or invalid payload"); + result = await _ai.EmbedAsync(embedPayload.Content); + break; + case "speech.devices.list": + result = await _speech.ListDevicesAsync(); + break; + case "speech.transcribe": + var speechPayload = DeserializePayload(cmd.Payload); + if (speechPayload is null) + return Error("Missing or invalid payload"); + var audioBase64 = !string.IsNullOrWhiteSpace(speechPayload.AudioBase64) + ? speechPayload.AudioBase64 + : speechPayload.Audio_Base64; + var text = speechPayload.Text; + var whisperModel = !string.IsNullOrWhiteSpace(speechPayload.WhisperModel) + ? speechPayload.WhisperModel + : speechPayload.Whisper_Model; + var simulateDelayMs = speechPayload.SimulateDelayMs ?? speechPayload.Simulate_Delay_Ms; + if (string.IsNullOrWhiteSpace(audioBase64) && string.IsNullOrWhiteSpace(text)) + return Error("Missing or invalid payload"); + result = await _speech.TranscribeAsync(new SpeechTranscribeRequestDto( + AudioBase64: audioBase64, + Engine: speechPayload.Engine, + WhisperModel: whisperModel, + Text: text, + SimulateDelayMs: simulateDelayMs)); + break; + case "vault.initialize": + var initPayload = DeserializePayload(cmd.Payload); + if (initPayload is null || string.IsNullOrWhiteSpace(initPayload.Password) || string.IsNullOrWhiteSpace(initPayload.VaultDirectory)) + return Error("Missing or invalid payload"); + Directory.CreateDirectory(initPayload.VaultDirectory); + result = true; + break; + case "vault.load_all": + var loadPayload = DeserializePayload(cmd.Payload); + if (loadPayload is null) + return Error("Missing or invalid payload"); + var loaded = _vaultStorage.LoadAllVaults(loadPayload.Password, loadPayload.VaultDirectory, loadPayload.DataDirectory); + if (loaded) + _databaseSession.SetPassword(loadPayload.Password, loadPayload.DataDirectory); + result = loaded; + break; + case "vault.save_current_month": + var saveCurrentPayload = DeserializePayload(cmd.Payload); + if (saveCurrentPayload is null) + return Error("Missing or invalid payload"); + result = _vaultStorage.SaveCurrentMonthVault( + saveCurrentPayload.Password, + saveCurrentPayload.VaultDirectory, + saveCurrentPayload.DataDirectory, + ParseNowOrDefault(saveCurrentPayload.NowUtc)); + break; + case "vault.rebuild_all": + var rebuildPayload = DeserializePayload(cmd.Payload); + if (rebuildPayload is null) + return Error("Missing or invalid payload"); + _databaseSession.CloseConnection(); + _vaultStorage.RebuildAllVaults(rebuildPayload.Password, rebuildPayload.VaultDirectory, rebuildPayload.DataDirectory); + result = true; + break; + case "vault.clear_data_directory": + var clearPayload = DeserializePayload(cmd.Payload); + if (clearPayload is null || string.IsNullOrWhiteSpace(clearPayload.DataDirectory)) + return Error("Missing or invalid payload"); + if (_databaseSession is IDisposable disposableSession) + disposableSession.Dispose(); + _vaultStorage.ClearDataDirectory(clearPayload.DataDirectory); + result = true; + break; + case "db.status": + var dbStatusPayload = DeserializePayload(cmd.Payload); + if (dbStatusPayload is null || string.IsNullOrWhiteSpace(dbStatusPayload.Password)) + return Error("Missing or invalid payload"); + result = _database.GetStatus(dbStatusPayload.Password, dbStatusPayload.DataDirectory); + break; + case "db.initialize_schema": + var dbInitPayload = DeserializePayload(cmd.Payload); + if (dbInitPayload is null) + return Error("Missing or invalid payload"); + var schemaPath = _database.WriteSchemaBootstrap(dbInitPayload.DataDirectory); + result = new { schemaPath }; + break; + case "db.hydrate_workspace": + var dbHydratePayload = DeserializePayload(cmd.Payload); + if (dbHydratePayload is null || string.IsNullOrWhiteSpace(dbHydratePayload.Password)) + return Error("Missing or invalid payload"); + result = _database.HydrateWorkspace(dbHydratePayload.Password, dbHydratePayload.DataDirectory); + _databaseSession.SetPassword(dbHydratePayload.Password, dbHydratePayload.DataDirectory); + break; + default: + CommandLogger.LogFailure(action, correlationId, "unknown_action"); + return Error($"Unknown action: {action}"); + } + } + catch (JsonException) + { + CommandLogger.LogFailure(action, correlationId, "invalid_payload_json"); + return Error("Missing or invalid payload"); + } + catch (ValidationException ex) + { + CommandLogger.LogFailure(action, correlationId, "validation", ex.Message); + return Error(ex.Message); + } + catch (ArgumentException ex) + { + CommandLogger.LogFailure(action, correlationId, "argument", ex.Message); + return Error(ex.Message); + } + catch (TimeoutException ex) + { + CommandLogger.LogFailure(action, correlationId, "timeout", ex.Message); + return Error(ex.Message); + } + catch (InvalidOperationException ex) + { + CommandLogger.LogFailure(action, correlationId, "invalid_operation", ex.Message); + return Error(ex.Message); + } + catch (FileNotFoundException ex) + { + CommandLogger.LogFailure(action, correlationId, "not_found", ex.Message); + return Error(ex.Message); + } + catch + { + CommandLogger.LogFailure(action, correlationId, "internal_error"); + return Error("Internal error"); + } + + TryAutoSyncVault(action, correlationId); + CommandLogger.LogSuccess(action, correlationId); + return JsonSerializer.Serialize(new { ok = true, data = result }); + } + + private static string Error(string message) + => JsonSerializer.Serialize(new { ok = false, error = message }); + + private static T? DeserializePayload(JsonElement? payload) + { + if (payload is null) + return default; + return payload.Value.Deserialize(JsonOptions); + } + + private static DateTime ParseNowOrDefault(string? nowUtc) + { + if (string.IsNullOrWhiteSpace(nowUtc)) + return DateTime.UtcNow; + + if (DateTime.TryParse( + nowUtc, + CultureInfo.InvariantCulture, + DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal, + out var parsed)) + { + return parsed; + } + + throw new ArgumentException("Invalid nowUtc value. Expected ISO date/time."); + } + + private void TryAutoSyncVault(string action, string correlationId) + { + if (!VaultSyncActions.Contains(action)) + return; + + if (!_databaseSession.TryGetSession(out var password, out var sessionDataDirectory)) + return; + + try + { + var config = _config.Current; + var dataDirectory = string.IsNullOrWhiteSpace(sessionDataDirectory) + ? config.DataDirectory + : sessionDataDirectory; + + _databaseSession.CloseConnection(); + _vaultStorage.RebuildAllVaults(password, config.VaultDirectory, dataDirectory); + } + catch (Exception ex) + { + CommandLogger.LogFailure(action, correlationId, "vault_auto_sync_failed", ex.Message); + } + } +} diff --git a/Journal.Core/Journal.Core.csproj b/Journal.Core/Journal.Core.csproj new file mode 100644 index 0000000..7e67750 --- /dev/null +++ b/Journal.Core/Journal.Core.csproj @@ -0,0 +1,15 @@ + + + + net10.0 + enable + enable + + + + + + + + + diff --git a/Journal.Core/Models/Command.cs b/Journal.Core/Models/Command.cs new file mode 100644 index 0000000..ac44027 --- /dev/null +++ b/Journal.Core/Models/Command.cs @@ -0,0 +1,13 @@ +using System.Text.Json; + +namespace Journal.Core.Models; + +public class Command +{ + public string Action { get; set; } = ""; + public string? CorrelationId { get; set; } + public string? Id { get; set; } + public string? Type { get; set; } + public string? Tag { get; set; } + public JsonElement? Payload { get; set; } +} diff --git a/Journal.Core/Models/Fragment.cs b/Journal.Core/Models/Fragment.cs new file mode 100644 index 0000000..6b67db7 --- /dev/null +++ b/Journal.Core/Models/Fragment.cs @@ -0,0 +1,42 @@ +namespace Journal.Core.Models; + +public class Fragment +{ + public Guid Id { get; } + public string Type { get; set; } + public string Description { get; set; } + public DateTimeOffset Time { get; set; } + public List Tags { get; set; } = []; + + public Fragment(string type, string description) + { + Validate(type, description); + + Id = Guid.NewGuid(); + Type = type.Trim(); + Description = description.Trim(); + Time = DateTimeOffset.Now; + } + + public Fragment(Guid id, string type, string description, DateTimeOffset time, IEnumerable? tags = null) + { + if (id == Guid.Empty) + throw new ArgumentException("Id is required", nameof(id)); + Validate(type, description); + + Id = id; + Type = type.Trim(); + Description = description.Trim(); + Time = time; + if (tags is not null) + Tags = [.. tags.Where(t => !string.IsNullOrWhiteSpace(t)).Select(t => t.Trim())]; + } + + private static void Validate(string type, string description) + { + if (string.IsNullOrWhiteSpace(type)) + throw new ArgumentException("Type is required", nameof(type)); + if (string.IsNullOrWhiteSpace(description)) + throw new ArgumentException("Description is required", nameof(description)); + } +} diff --git a/Journal.Core/Models/JournalConfig.cs b/Journal.Core/Models/JournalConfig.cs new file mode 100644 index 0000000..f540a41 --- /dev/null +++ b/Journal.Core/Models/JournalConfig.cs @@ -0,0 +1,29 @@ +namespace Journal.Core.Models; + +public sealed record JournalConfig( + string ProjectRoot, + string AppDirectory, + string DataDirectory, + string VaultDirectory, + string LogDirectory, + string PidFile, + string ServerControlFile, + string DatabaseFilename, + string MonthlyVaultFormat, + string CloudAiApiKey, + string CloudAiApiUrl, + string LlamaCppUrl, + string LlamaCppModel, + int LlamaCppTimeout, + string EmbeddingApiUrl, + string EmbeddingModelName, + int ModelContextTokens, + int ChunkTokenBudget, + int? MicrophoneDeviceIndex, + string SpeechRecognitionEngine, + string WhisperModelSize, + string NlpBackend, + string AiProvider, + string PythonExecutable, + string PythonAiSidecarPath, + int AiSidecarTimeoutMs); diff --git a/Journal.Core/Models/JournalEntry.cs b/Journal.Core/Models/JournalEntry.cs new file mode 100644 index 0000000..e647c55 --- /dev/null +++ b/Journal.Core/Models/JournalEntry.cs @@ -0,0 +1,98 @@ +namespace Journal.Core.Models; + +public class JournalEntry +{ + public string Date { get; set; } + public List Fragments { get; set; } + public string RawContent { get; set; } + public Dictionary Sections { get; set; } + + public JournalEntry( + string date, + IEnumerable? fragments = null, + string rawContent = "", + IDictionary? sections = null) + { + if (string.IsNullOrWhiteSpace(date)) + throw new ArgumentException("Date is required", nameof(date)); + + Date = date.Trim(); + Fragments = fragments is null ? [] : [.. fragments]; + RawContent = rawContent ?? ""; + Sections = sections is null ? [] : new Dictionary(sections); + } + + public string GetSection(string sectionTitle) + { + if (string.IsNullOrWhiteSpace(sectionTitle)) + return ""; + if (!Sections.TryGetValue(sectionTitle, out var section)) + return ""; + return string.Join("\n", section.Content); + } + + public bool? GetCheckboxState(string sectionTitle, string checkboxText) + { + if (string.IsNullOrWhiteSpace(sectionTitle) || string.IsNullOrWhiteSpace(checkboxText)) + return null; + if (!Sections.TryGetValue(sectionTitle, out var section)) + return null; + return section.Checkboxes.TryGetValue(checkboxText, out var checkedState) ? checkedState : null; + } + + public void MergeWith(JournalEntry otherEntry) + { + ArgumentNullException.ThrowIfNull(otherEntry); + + foreach (var (title, newSection) in otherEntry.Sections) + { + if (newSection.Content.Any(line => !string.IsNullOrWhiteSpace(line))) + Sections[title] = newSection; + } + + var existingFragmentDescriptions = Fragments + .Select(fragment => fragment.Description) + .ToHashSet(StringComparer.Ordinal); + + foreach (var newFragment in otherEntry.Fragments) + { + if (!existingFragmentDescriptions.Contains(newFragment.Description)) + Fragments.Add(newFragment); + } + } + + public string ToMarkdown() + { + var lines = new List + { + "---", + "type: journal", + "---", + $"**Date:** {Date}\n" + }; + + foreach (var title in SectionTitles.Canonical) + { + if (!Sections.TryGetValue(title, out var section)) + continue; + + lines.Add($"## {section.Title}\n"); + lines.AddRange(section.Content); + lines.Add(""); + } + + if (Fragments.Count > 0) + { + lines.Add("# Fragments\n"); + foreach (var fragment in Fragments) + { + var timeStr = fragment.Time != default ? $"@{fragment.Time:O}" : ""; + var tagsStr = string.Join(" ", fragment.Tags.Select(tag => $"#{tag}")); + var header = $"{fragment.Type} {timeStr} {tagsStr}".Trim(); + lines.Add($"{header}\n{fragment.Description}\n"); + } + } + + return string.Join("\n", lines); + } +} diff --git a/Journal.Core/Models/ListDocument.cs b/Journal.Core/Models/ListDocument.cs new file mode 100644 index 0000000..c61a9c7 --- /dev/null +++ b/Journal.Core/Models/ListDocument.cs @@ -0,0 +1,40 @@ +namespace Journal.Core.Models; + +public class ListDocument +{ + public Guid Id { get; } + public string Label { get; set; } + public string Content { get; set; } + public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset UpdatedAt { get; set; } + + public ListDocument(string label, string content = "") + { + Validate(label); + + Id = Guid.NewGuid(); + Label = label.Trim(); + Content = content; + CreatedAt = DateTimeOffset.Now; + UpdatedAt = CreatedAt; + } + + public ListDocument(Guid id, string label, string content, DateTimeOffset createdAt, DateTimeOffset updatedAt) + { + if (id == Guid.Empty) + throw new ArgumentException("Id is required", nameof(id)); + Validate(label); + + Id = id; + Label = label.Trim(); + Content = content; + CreatedAt = createdAt; + UpdatedAt = updatedAt; + } + + private static void Validate(string label) + { + if (string.IsNullOrWhiteSpace(label)) + throw new ArgumentException("Label is required", nameof(label)); + } +} diff --git a/Journal.Core/Models/ParsedSection.cs b/Journal.Core/Models/ParsedSection.cs new file mode 100644 index 0000000..bc9ff3c --- /dev/null +++ b/Journal.Core/Models/ParsedSection.cs @@ -0,0 +1,21 @@ +namespace Journal.Core.Models; + +public class ParsedSection +{ + public string Title { get; set; } + public List Content { get; set; } + public Dictionary Checkboxes { get; set; } + + public ParsedSection( + string title, + IEnumerable? content = null, + IDictionary? checkboxes = null) + { + if (string.IsNullOrWhiteSpace(title)) + throw new ArgumentException("Section title is required", nameof(title)); + + Title = title.Trim(); + Content = content is null ? [] : [.. content]; + Checkboxes = checkboxes is null ? [] : new Dictionary(checkboxes); + } +} diff --git a/Journal.Core/Models/SectionTitles.cs b/Journal.Core/Models/SectionTitles.cs new file mode 100644 index 0000000..3aaf666 --- /dev/null +++ b/Journal.Core/Models/SectionTitles.cs @@ -0,0 +1,20 @@ +namespace Journal.Core.Models; + +public static class SectionTitles +{ + public static readonly IReadOnlyList Canonical = + [ + "Summary", + "Cognitive State", + "Mental / Emotional Snapshot", + "Memory / Mind Failures", + "Events / Triggers", + "Communication / Expression Log", + "Coping / Tools Used", + "Reflection", + "Core Events or Memories", + "Autism/ADHD-Related Elements", + "Emotional & Bodily Reactions", + "Truth to Anchor Myself To", + ]; +} diff --git a/Journal.Core/Models/TodoItem.cs b/Journal.Core/Models/TodoItem.cs new file mode 100644 index 0000000..f225aa0 --- /dev/null +++ b/Journal.Core/Models/TodoItem.cs @@ -0,0 +1,44 @@ +namespace Journal.Core.Models; + +public class TodoItem +{ + public Guid Id { get; } + public Guid ListId { get; } + public string Text { get; set; } + public bool Done { get; set; } + public int SortOrder { get; set; } + + public TodoItem(Guid listId, string text, int sortOrder = 0) + { + Validate(text); + if (listId == Guid.Empty) + throw new ArgumentException("ListId is required", nameof(listId)); + + Id = Guid.NewGuid(); + ListId = listId; + Text = text.Trim(); + Done = false; + SortOrder = sortOrder; + } + + public TodoItem(Guid id, Guid listId, string text, bool done, int sortOrder) + { + if (id == Guid.Empty) + throw new ArgumentException("Id is required", nameof(id)); + if (listId == Guid.Empty) + throw new ArgumentException("ListId is required", nameof(listId)); + Validate(text); + + Id = id; + ListId = listId; + Text = text.Trim(); + Done = done; + SortOrder = sortOrder; + } + + private static void Validate(string text) + { + if (string.IsNullOrWhiteSpace(text)) + throw new ArgumentException("Text is required", nameof(text)); + } +} diff --git a/Journal.Core/Models/TodoList.cs b/Journal.Core/Models/TodoList.cs new file mode 100644 index 0000000..6fa533e --- /dev/null +++ b/Journal.Core/Models/TodoList.cs @@ -0,0 +1,34 @@ +namespace Journal.Core.Models; + +public class TodoList +{ + public Guid Id { get; } + public string Label { get; set; } + public DateTimeOffset CreatedAt { get; set; } + + public TodoList(string label) + { + Validate(label); + + Id = Guid.NewGuid(); + Label = label.Trim(); + CreatedAt = DateTimeOffset.Now; + } + + public TodoList(Guid id, string label, DateTimeOffset createdAt) + { + if (id == Guid.Empty) + throw new ArgumentException("Id is required", nameof(id)); + Validate(label); + + Id = id; + Label = label.Trim(); + CreatedAt = createdAt; + } + + private static void Validate(string label) + { + if (string.IsNullOrWhiteSpace(label)) + throw new ArgumentException("Label is required", nameof(label)); + } +} diff --git a/Journal.Core/Repositories/DiskEntryFileRepository.cs b/Journal.Core/Repositories/DiskEntryFileRepository.cs new file mode 100644 index 0000000..d24c4d8 --- /dev/null +++ b/Journal.Core/Repositories/DiskEntryFileRepository.cs @@ -0,0 +1,35 @@ +namespace Journal.Core.Repositories; + +public sealed class DiskEntryFileRepository : IEntryFileRepository +{ + public IReadOnlyList ListMarkdownFiles(string dataDirectory) + { + if (!Directory.Exists(dataDirectory)) + return []; + + return [.. Directory.GetFiles(dataDirectory, "*.md").OrderBy(Path.GetFileName, StringComparer.Ordinal)]; + } + + public string ReadFile(string filePath) => File.ReadAllText(filePath); + + public void WriteFile(string filePath, string content) => File.WriteAllText(filePath, content); + + public void AppendFile(string filePath, string content) => File.AppendAllText(filePath, content); + + public bool FileExists(string filePath) => File.Exists(filePath); + + public string GetFullPath(string filePath) => Path.GetFullPath(filePath); + + public string GetFileName(string filePath) => Path.GetFileName(filePath); + + public string GetFileNameWithoutExtension(string filePath) => Path.GetFileNameWithoutExtension(filePath); + + public void EnsureDirectory(string path) + { + var dir = Path.GetDirectoryName(path); + if (!string.IsNullOrWhiteSpace(dir)) + Directory.CreateDirectory(dir); + } + + public void DeleteFile(string filePath) => File.Delete(filePath); +} diff --git a/Journal.Core/Repositories/IEntryFileRepository.cs b/Journal.Core/Repositories/IEntryFileRepository.cs new file mode 100644 index 0000000..ac93437 --- /dev/null +++ b/Journal.Core/Repositories/IEntryFileRepository.cs @@ -0,0 +1,15 @@ +namespace Journal.Core.Repositories; + +public interface IEntryFileRepository +{ + IReadOnlyList ListMarkdownFiles(string dataDirectory); + string ReadFile(string filePath); + void WriteFile(string filePath, string content); + void AppendFile(string filePath, string content); + bool FileExists(string filePath); + string GetFullPath(string filePath); + string GetFileName(string filePath); + string GetFileNameWithoutExtension(string filePath); + void EnsureDirectory(string path); + void DeleteFile(string filePath); +} diff --git a/Journal.Core/Repositories/IFragmentRepository.cs b/Journal.Core/Repositories/IFragmentRepository.cs new file mode 100644 index 0000000..bb05f0d --- /dev/null +++ b/Journal.Core/Repositories/IFragmentRepository.cs @@ -0,0 +1,15 @@ +using Journal.Core.Models; + +namespace Journal.Core.Repositories; + +public interface IFragmentRepository +{ + List GetAll(); + Fragment? GetById(Guid id); + void Add(Fragment fragment); + bool Remove(Guid id); + bool Update(Guid id, string? type = null, string? description = null, IEnumerable? tags = null, DateTimeOffset? time = null); + List GetByTag(string tag); + List GetByType(string type); + List Search(string? type = null, string? tag = null, DateTimeOffset? timeAfter = null); +} diff --git a/Journal.Core/Repositories/IListRepository.cs b/Journal.Core/Repositories/IListRepository.cs new file mode 100644 index 0000000..5191443 --- /dev/null +++ b/Journal.Core/Repositories/IListRepository.cs @@ -0,0 +1,12 @@ +using Journal.Core.Models; + +namespace Journal.Core.Repositories; + +public interface IListRepository +{ + List GetAll(); + ListDocument? GetById(Guid id); + void Add(ListDocument list); + bool Update(Guid id, string? label = null, string? content = null); + bool Remove(Guid id); +} diff --git a/Journal.Core/Repositories/ITodoRepository.cs b/Journal.Core/Repositories/ITodoRepository.cs new file mode 100644 index 0000000..87fcb58 --- /dev/null +++ b/Journal.Core/Repositories/ITodoRepository.cs @@ -0,0 +1,18 @@ +using Journal.Core.Models; + +namespace Journal.Core.Repositories; + +public interface ITodoRepository +{ + List GetAllLists(); + TodoList? GetListById(Guid id); + void AddList(TodoList list); + bool UpdateList(Guid id, string? label = null); + bool RemoveList(Guid id); + + List GetItemsByListId(Guid listId); + TodoItem? GetItemById(Guid id); + void AddItem(TodoItem item); + bool UpdateItem(Guid id, string? text = null, bool? done = null, int? sortOrder = null); + bool RemoveItem(Guid id); +} diff --git a/Journal.Core/Repositories/InMemoryFragmentRepository.cs b/Journal.Core/Repositories/InMemoryFragmentRepository.cs new file mode 100644 index 0000000..22bf26a --- /dev/null +++ b/Journal.Core/Repositories/InMemoryFragmentRepository.cs @@ -0,0 +1,125 @@ +using Journal.Core.Models; + +namespace Journal.Core.Repositories; + +public class InMemoryFragmentRepository : IFragmentRepository +{ + private readonly List _store = []; + private readonly Lock _lock = new(); + + public List GetAll() + { + lock (_lock) + { + return [.. _store]; + } + } + + public Fragment? GetById(Guid id) + { + lock (_lock) + { + return _store.FirstOrDefault(f => f.Id == id); + } + } + + public void Add(Fragment fragment) + { + if (fragment is null) throw new ArgumentNullException(nameof(fragment)); + lock (_lock) + { + if (fragment.Tags != null) + { + fragment.Tags = [.. fragment.Tags + .Where(t => !string.IsNullOrWhiteSpace(t)) + .Select(t => t!.Trim())]; + } + if (!string.IsNullOrWhiteSpace(fragment.Type)) fragment.Type = fragment.Type.Trim(); + if (!string.IsNullOrWhiteSpace(fragment.Description)) fragment.Description = fragment.Description.Trim(); + + _store.Add(fragment); + } + } + + public bool Remove(Guid id) + { + lock (_lock) + { + var item = _store.FirstOrDefault(f => f.Id == id); + if (item is null) return false; + return _store.Remove(item); + } + } + + public bool Update(Guid id, string? type = null, string? description = null, IEnumerable? tags = null, DateTimeOffset? time = null) + { + lock (_lock) + { + var item = _store.FirstOrDefault(f => f.Id == id); + if (item is null) return false; + + if (type != null) + { + if (string.IsNullOrWhiteSpace(type)) throw new ArgumentException("Type cannot be empty", nameof(type)); + item.Type = type.Trim(); + } + + if (description != null) + { + if (string.IsNullOrWhiteSpace(description)) throw new ArgumentException("Description cannot be empty", nameof(description)); + item.Description = description.Trim(); + } + + if (tags != null) + { + item.Tags = [.. tags + .Where(t => !string.IsNullOrWhiteSpace(t)) + .Select(t => t!.Trim())]; + } + + if (time.HasValue) + item.Time = time.Value; + + return true; + } + } + + public List GetByTag(string tag) + { + var q = tag?.Trim(); + if (string.IsNullOrWhiteSpace(q)) return []; + lock (_lock) + { + return [.. _store.Where(f => f.Tags?.Any(t => !string.IsNullOrWhiteSpace(t) && t.Contains(q, StringComparison.OrdinalIgnoreCase)) == true)]; + } + } + + public List GetByType(string type) + { + var q = type?.Trim(); + if (string.IsNullOrWhiteSpace(q)) return []; + lock (_lock) + { + return [.. _store.Where(f => !string.IsNullOrWhiteSpace(f.Type) && f.Type.Trim().Contains(q, StringComparison.OrdinalIgnoreCase))]; + } + } + + public List Search(string? type = null, string? tag = null, DateTimeOffset? timeAfter = null) + { + var results = _store.AsEnumerable(); + var qType = type?.Trim(); + var qTag = tag?.Trim(); + + lock (_lock) + { + if (!string.IsNullOrWhiteSpace(qType)) + results = results.Where(f => !string.IsNullOrWhiteSpace(f.Type) && f.Type.Trim().Contains(qType, StringComparison.OrdinalIgnoreCase)); + if (!string.IsNullOrWhiteSpace(qTag)) + results = results.Where(f => f.Tags?.Any(t => !string.IsNullOrWhiteSpace(t) && t.Contains(qTag, StringComparison.OrdinalIgnoreCase)) == true); + if (timeAfter.HasValue) + results = results.Where(f => f.Time > timeAfter.Value); + + return [.. results]; + } + } +} diff --git a/Journal.Core/Repositories/SqliteFragmentRepository.cs b/Journal.Core/Repositories/SqliteFragmentRepository.cs new file mode 100644 index 0000000..52e7d3a --- /dev/null +++ b/Journal.Core/Repositories/SqliteFragmentRepository.cs @@ -0,0 +1,310 @@ +using Journal.Core.Models; +using Journal.Core.Services.Database; +using Microsoft.Data.Sqlite; + +namespace Journal.Core.Repositories; + +public sealed class SqliteFragmentRepository(IDatabaseSessionService session) : IFragmentRepository +{ + private readonly IDatabaseSessionService _session = session; + + public List GetAll() + { + var conn = _session.GetConnection(); + return ReadAllFragments(conn); + } + + public Fragment? GetById(Guid id) + { + var conn = _session.GetConnection(); + return ReadFragment(conn, id); + } + + public void Add(Fragment fragment) + { + ArgumentNullException.ThrowIfNull(fragment); + Normalize(fragment); + var conn = _session.GetConnection(); + InsertFragment(conn, fragment); + } + + public bool Remove(Guid id) + { + var conn = _session.GetConnection(); + return DeleteFragment(conn, id); + } + + public bool Update( + Guid id, + string? type = null, + string? description = null, + IEnumerable? tags = null, + DateTimeOffset? time = null) + { + var conn = _session.GetConnection(); + var existing = ReadFragment(conn, id); + if (existing is null) + return false; + + if (type != null) + { + if (string.IsNullOrWhiteSpace(type)) + throw new ArgumentException("Type cannot be empty", nameof(type)); + existing.Type = type.Trim(); + } + + if (description != null) + { + if (string.IsNullOrWhiteSpace(description)) + throw new ArgumentException("Description cannot be empty", nameof(description)); + existing.Description = description.Trim(); + } + + if (tags != null) + { + existing.Tags = [.. + tags.Where(t => !string.IsNullOrWhiteSpace(t)) + .Select(t => t.Trim())]; + } + + if (time.HasValue) + existing.Time = time.Value; + + UpdateFragmentRow(conn, existing); + return true; + } + + public List GetByTag(string tag) + { + var q = tag?.Trim(); + if (string.IsNullOrWhiteSpace(q)) + return []; + + var conn = _session.GetConnection(); + var all = ReadAllFragments(conn); + return [.. all.Where(f => f.Tags.Any(t => t.Contains(q, StringComparison.OrdinalIgnoreCase)))]; + } + + public List GetByType(string type) + { + var q = type?.Trim(); + if (string.IsNullOrWhiteSpace(q)) + return []; + + var conn = _session.GetConnection(); + var all = ReadAllFragments(conn); + return [.. all.Where(f => f.Type.Contains(q, StringComparison.OrdinalIgnoreCase))]; + } + + public List Search(string? type = null, string? tag = null, DateTimeOffset? timeAfter = null) + { + var conn = _session.GetConnection(); + IEnumerable results = ReadAllFragments(conn); + + var qType = type?.Trim(); + var qTag = tag?.Trim(); + + if (!string.IsNullOrWhiteSpace(qType)) + results = results.Where(f => f.Type.Contains(qType, StringComparison.OrdinalIgnoreCase)); + if (!string.IsNullOrWhiteSpace(qTag)) + results = results.Where(f => f.Tags.Any(t => t.Contains(qTag, StringComparison.OrdinalIgnoreCase))); + if (timeAfter.HasValue) + results = results.Where(f => f.Time > timeAfter.Value); + + return [.. results]; + } + + // ── Private helpers ────────────────────────────────────────────── + + private static void InsertFragment(SqliteConnection conn, Fragment f) + { + using var tx = conn.BeginTransaction(); + + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + INSERT INTO fragments (guid, entry_id, type, description, time) + VALUES (@guid, NULL, @type, @description, @time); + """; + cmd.Parameters.AddWithValue("@guid", f.Id.ToString("D")); + cmd.Parameters.AddWithValue("@type", f.Type); + cmd.Parameters.AddWithValue("@description", f.Description); + cmd.Parameters.AddWithValue("@time", f.Time.ToString("O")); + cmd.ExecuteNonQuery(); + + var fragmentRowId = GetFragmentRowId(conn, f.Id); + if (fragmentRowId.HasValue) + InsertTags(conn, fragmentRowId.Value, f.Tags); + + tx.Commit(); + } + + private static void UpdateFragmentRow(SqliteConnection conn, Fragment f) + { + using var tx = conn.BeginTransaction(); + + using var upd = conn.CreateCommand(); + upd.CommandText = """ + UPDATE fragments SET type = @type, description = @description, time = @time + WHERE guid = @guid AND entry_id IS NULL; + """; + upd.Parameters.AddWithValue("@guid", f.Id.ToString("D")); + upd.Parameters.AddWithValue("@type", f.Type); + upd.Parameters.AddWithValue("@description", f.Description); + upd.Parameters.AddWithValue("@time", f.Time.ToString("O")); + upd.ExecuteNonQuery(); + + var fragmentRowId = GetFragmentRowId(conn, f.Id); + if (fragmentRowId.HasValue) + { + using var del = conn.CreateCommand(); + del.CommandText = "DELETE FROM fragment_tags WHERE fragment_id = @id;"; + del.Parameters.AddWithValue("@id", fragmentRowId.Value); + del.ExecuteNonQuery(); + + InsertTags(conn, fragmentRowId.Value, f.Tags); + } + + tx.Commit(); + } + + private static bool DeleteFragment(SqliteConnection conn, Guid id) + { + using var tx = conn.BeginTransaction(); + + var fragmentRowId = GetFragmentRowId(conn, id); + if (fragmentRowId.HasValue) + { + using var delTags = conn.CreateCommand(); + delTags.CommandText = "DELETE FROM fragment_tags WHERE fragment_id = @id;"; + delTags.Parameters.AddWithValue("@id", fragmentRowId.Value); + delTags.ExecuteNonQuery(); + } + + using var delFrag = conn.CreateCommand(); + delFrag.CommandText = "DELETE FROM fragments WHERE guid = @guid AND entry_id IS NULL;"; + delFrag.Parameters.AddWithValue("@guid", id.ToString("D")); + var rows = delFrag.ExecuteNonQuery(); + + tx.Commit(); + return rows > 0; + } + + private static Fragment? ReadFragment(SqliteConnection conn, Guid id) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + SELECT id, guid, type, description, time + FROM fragments WHERE guid = @guid AND entry_id IS NULL; + """; + cmd.Parameters.AddWithValue("@guid", id.ToString("D")); + + using var reader = cmd.ExecuteReader(); + if (!reader.Read()) + return null; + + var fragment = MapRow(reader); + fragment.Tags = ReadTags(conn, reader.GetInt64(0)); + return fragment; + } + + private static List ReadAllFragments(SqliteConnection conn) + { + var fragments = new List(); + var rowIds = new List(); + + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + SELECT id, guid, type, description, time + FROM fragments WHERE guid IS NOT NULL AND entry_id IS NULL + ORDER BY time; + """; + + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + { + fragments.Add(MapRow(reader)); + rowIds.Add(reader.GetInt64(0)); + } + + for (var i = 0; i < fragments.Count; i++) + fragments[i].Tags = ReadTags(conn, rowIds[i]); + + return fragments; + } + + private static List ReadTags(SqliteConnection conn, long fragmentRowId) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + SELECT t.name FROM tags t + INNER JOIN fragment_tags ft ON ft.tag_id = t.id + WHERE ft.fragment_id = @id + ORDER BY t.name; + """; + cmd.Parameters.AddWithValue("@id", fragmentRowId); + + var tags = new List(); + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + tags.Add(reader.GetString(0)); + + return tags; + } + + private static long? GetFragmentRowId(SqliteConnection conn, Guid guid) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = "SELECT id FROM fragments WHERE guid = @guid;"; + cmd.Parameters.AddWithValue("@guid", guid.ToString("D")); + var result = cmd.ExecuteScalar(); + return result is long id ? id : null; + } + + private static void InsertTags(SqliteConnection conn, long fragmentRowId, List tags) + { + if (tags.Count == 0) return; + + foreach (var tag in tags) + { + // Upsert into tags table + using var upsert = conn.CreateCommand(); + upsert.CommandText = "INSERT OR IGNORE INTO tags (name) VALUES (@name);"; + upsert.Parameters.AddWithValue("@name", tag); + upsert.ExecuteNonQuery(); + + // Get tag id + using var getTagId = conn.CreateCommand(); + getTagId.CommandText = "SELECT id FROM tags WHERE name = @name;"; + getTagId.Parameters.AddWithValue("@name", tag); + var tagId = (long)getTagId.ExecuteScalar()!; + + // Link fragment to tag + using var link = conn.CreateCommand(); + link.CommandText = "INSERT OR IGNORE INTO fragment_tags (fragment_id, tag_id) VALUES (@fid, @tid);"; + link.Parameters.AddWithValue("@fid", fragmentRowId); + link.Parameters.AddWithValue("@tid", tagId); + link.ExecuteNonQuery(); + } + } + + private static Fragment MapRow(SqliteDataReader reader) + { + // columns: id (int), guid (text), type (text), description (text), time (text) + var guid = Guid.Parse(reader.GetString(1)); + var type = reader.GetString(2); + var description = reader.IsDBNull(3) ? "" : reader.GetString(3); + var time = reader.IsDBNull(4) + ? DateTimeOffset.MinValue + : DateTimeOffset.Parse(reader.GetString(4)); + return new Fragment(guid, type, description, time); + } + + private static void Normalize(Fragment fragment) + { + fragment.Type = fragment.Type.Trim(); + fragment.Description = fragment.Description.Trim(); + fragment.Tags = [.. + fragment.Tags.Where(t => !string.IsNullOrWhiteSpace(t)) + .Select(t => t.Trim())]; + } +} diff --git a/Journal.Core/Repositories/SqliteListRepository.cs b/Journal.Core/Repositories/SqliteListRepository.cs new file mode 100644 index 0000000..4a51225 --- /dev/null +++ b/Journal.Core/Repositories/SqliteListRepository.cs @@ -0,0 +1,129 @@ +using Journal.Core.Models; +using Journal.Core.Services.Database; +using Microsoft.Data.Sqlite; + +namespace Journal.Core.Repositories; + +public sealed class SqliteListRepository(IDatabaseSessionService session) : IListRepository +{ + private readonly IDatabaseSessionService _session = session; + + public List GetAll() + { + var conn = _session.GetConnection(); + return ReadAll(conn); + } + + public ListDocument? GetById(Guid id) + { + var conn = _session.GetConnection(); + return ReadById(conn, id); + } + + public void Add(ListDocument list) + { + ArgumentNullException.ThrowIfNull(list); + var conn = _session.GetConnection(); + Insert(conn, list); + } + + public bool Update(Guid id, string? label = null, string? content = null) + { + var conn = _session.GetConnection(); + var existing = ReadById(conn, id); + if (existing is null) + return false; + + if (label is not null) + { + if (string.IsNullOrWhiteSpace(label)) + throw new ArgumentException("Label cannot be empty", nameof(label)); + existing.Label = label.Trim(); + } + + if (content is not null) + existing.Content = content; + + existing.UpdatedAt = DateTimeOffset.Now; + UpdateRow(conn, existing); + return true; + } + + public bool Remove(Guid id) + { + var conn = _session.GetConnection(); + return Delete(conn, id); + } + + // ── Private helpers ────────────────────────────────────────────── + + private static void Insert(SqliteConnection conn, ListDocument list) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + INSERT INTO lists (guid, label, content, created_at, updated_at) + VALUES (@guid, @label, @content, @createdAt, @updatedAt); + """; + cmd.Parameters.AddWithValue("@guid", list.Id.ToString("D")); + cmd.Parameters.AddWithValue("@label", list.Label); + cmd.Parameters.AddWithValue("@content", list.Content); + cmd.Parameters.AddWithValue("@createdAt", list.CreatedAt.ToString("O")); + cmd.Parameters.AddWithValue("@updatedAt", list.UpdatedAt.ToString("O")); + cmd.ExecuteNonQuery(); + } + + private static void UpdateRow(SqliteConnection conn, ListDocument list) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + UPDATE lists SET label = @label, content = @content, updated_at = @updatedAt + WHERE guid = @guid; + """; + cmd.Parameters.AddWithValue("@guid", list.Id.ToString("D")); + cmd.Parameters.AddWithValue("@label", list.Label); + cmd.Parameters.AddWithValue("@content", list.Content); + cmd.Parameters.AddWithValue("@updatedAt", list.UpdatedAt.ToString("O")); + cmd.ExecuteNonQuery(); + } + + private static bool Delete(SqliteConnection conn, Guid id) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = "DELETE FROM lists WHERE guid = @guid;"; + cmd.Parameters.AddWithValue("@guid", id.ToString("D")); + return cmd.ExecuteNonQuery() > 0; + } + + private static ListDocument? ReadById(SqliteConnection conn, Guid id) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = "SELECT guid, label, content, created_at, updated_at FROM lists WHERE guid = @guid;"; + cmd.Parameters.AddWithValue("@guid", id.ToString("D")); + + using var reader = cmd.ExecuteReader(); + return reader.Read() ? MapRow(reader) : null; + } + + private static List ReadAll(SqliteConnection conn) + { + var results = new List(); + using var cmd = conn.CreateCommand(); + cmd.CommandText = "SELECT guid, label, content, created_at, updated_at FROM lists ORDER BY created_at;"; + + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + results.Add(MapRow(reader)); + + return results; + } + + private static ListDocument MapRow(SqliteDataReader reader) + { + var guid = Guid.Parse(reader.GetString(0)); + var label = reader.GetString(1); + var content = reader.IsDBNull(2) ? "" : reader.GetString(2); + var createdAt = reader.IsDBNull(3) ? DateTimeOffset.MinValue : DateTimeOffset.Parse(reader.GetString(3)); + var updatedAt = reader.IsDBNull(4) ? createdAt : DateTimeOffset.Parse(reader.GetString(4)); + return new ListDocument(guid, label, content, createdAt, updatedAt); + } +} diff --git a/Journal.Core/Repositories/SqliteTodoRepository.cs b/Journal.Core/Repositories/SqliteTodoRepository.cs new file mode 100644 index 0000000..725dfe8 --- /dev/null +++ b/Journal.Core/Repositories/SqliteTodoRepository.cs @@ -0,0 +1,279 @@ +using Journal.Core.Models; +using Journal.Core.Services.Database; +using Microsoft.Data.Sqlite; + +namespace Journal.Core.Repositories; + +public sealed class SqliteTodoRepository(IDatabaseSessionService session) : ITodoRepository +{ + private readonly IDatabaseSessionService _session = session; + + // ── Lists ──────────────────────────────────────────────────────── + + public List GetAllLists() + { + var conn = _session.GetConnection(); + return ReadAllLists(conn); + } + + public TodoList? GetListById(Guid id) + { + var conn = _session.GetConnection(); + return ReadListById(conn, id); + } + + public void AddList(TodoList list) + { + ArgumentNullException.ThrowIfNull(list); + var conn = _session.GetConnection(); + InsertList(conn, list); + } + + public bool UpdateList(Guid id, string? label = null) + { + var conn = _session.GetConnection(); + var existing = ReadListById(conn, id); + if (existing is null) + return false; + + if (label is not null) + { + if (string.IsNullOrWhiteSpace(label)) + throw new ArgumentException("Label cannot be empty", nameof(label)); + existing.Label = label.Trim(); + } + + UpdateListRow(conn, existing); + return true; + } + + public bool RemoveList(Guid id) + { + var conn = _session.GetConnection(); + return DeleteList(conn, id); + } + + // ── Items ──────────────────────────────────────────────────────── + + public List GetItemsByListId(Guid listId) + { + var conn = _session.GetConnection(); + return ReadItemsByListId(conn, listId); + } + + public TodoItem? GetItemById(Guid id) + { + var conn = _session.GetConnection(); + return ReadItemById(conn, id); + } + + public void AddItem(TodoItem item) + { + ArgumentNullException.ThrowIfNull(item); + var conn = _session.GetConnection(); + InsertItem(conn, item); + } + + public bool UpdateItem(Guid id, string? text = null, bool? done = null, int? sortOrder = null) + { + var conn = _session.GetConnection(); + var existing = ReadItemById(conn, id); + if (existing is null) + return false; + + if (text is not null) + { + if (string.IsNullOrWhiteSpace(text)) + throw new ArgumentException("Text cannot be empty", nameof(text)); + existing.Text = text.Trim(); + } + + if (done.HasValue) + existing.Done = done.Value; + + if (sortOrder.HasValue) + existing.SortOrder = sortOrder.Value; + + UpdateItemRow(conn, existing); + return true; + } + + public bool RemoveItem(Guid id) + { + var conn = _session.GetConnection(); + return DeleteItem(conn, id); + } + + // ── Private list helpers ───────────────────────────────────────── + + private static void InsertList(SqliteConnection conn, TodoList list) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + INSERT INTO todo_lists (guid, label, created_at) + VALUES (@guid, @label, @createdAt); + """; + cmd.Parameters.AddWithValue("@guid", list.Id.ToString("D")); + cmd.Parameters.AddWithValue("@label", list.Label); + cmd.Parameters.AddWithValue("@createdAt", list.CreatedAt.ToString("O")); + cmd.ExecuteNonQuery(); + } + + private static void UpdateListRow(SqliteConnection conn, TodoList list) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = "UPDATE todo_lists SET label = @label WHERE guid = @guid;"; + cmd.Parameters.AddWithValue("@guid", list.Id.ToString("D")); + cmd.Parameters.AddWithValue("@label", list.Label); + cmd.ExecuteNonQuery(); + } + + private static bool DeleteList(SqliteConnection conn, Guid id) + { + using var tx = conn.BeginTransaction(); + + var rowId = GetListRowId(conn, id); + if (rowId.HasValue) + { + using var delItems = conn.CreateCommand(); + delItems.CommandText = "DELETE FROM todo_items WHERE list_id = @listId;"; + delItems.Parameters.AddWithValue("@listId", rowId.Value); + delItems.ExecuteNonQuery(); + } + + using var delList = conn.CreateCommand(); + delList.CommandText = "DELETE FROM todo_lists WHERE guid = @guid;"; + delList.Parameters.AddWithValue("@guid", id.ToString("D")); + var rows = delList.ExecuteNonQuery(); + + tx.Commit(); + return rows > 0; + } + + private static TodoList? ReadListById(SqliteConnection conn, Guid id) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = "SELECT guid, label, created_at FROM todo_lists WHERE guid = @guid;"; + cmd.Parameters.AddWithValue("@guid", id.ToString("D")); + + using var reader = cmd.ExecuteReader(); + return reader.Read() ? MapListRow(reader) : null; + } + + private static List ReadAllLists(SqliteConnection conn) + { + var results = new List(); + using var cmd = conn.CreateCommand(); + cmd.CommandText = "SELECT guid, label, created_at FROM todo_lists ORDER BY created_at;"; + + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + results.Add(MapListRow(reader)); + + return results; + } + + private static long? GetListRowId(SqliteConnection conn, Guid guid) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = "SELECT id FROM todo_lists WHERE guid = @guid;"; + cmd.Parameters.AddWithValue("@guid", guid.ToString("D")); + var result = cmd.ExecuteScalar(); + return result is long id ? id : null; + } + + private static TodoList MapListRow(SqliteDataReader reader) + { + var guid = Guid.Parse(reader.GetString(0)); + var label = reader.GetString(1); + var createdAt = reader.IsDBNull(2) ? DateTimeOffset.MinValue : DateTimeOffset.Parse(reader.GetString(2)); + return new TodoList(guid, label, createdAt); + } + + // ── Private item helpers ───────────────────────────────────────── + + private static void InsertItem(SqliteConnection conn, TodoItem item) + { + var listRowId = GetListRowId(conn, item.ListId) + ?? throw new InvalidOperationException($"Todo list {item.ListId} not found"); + + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + INSERT INTO todo_items (guid, list_id, text, done, sort_order) + VALUES (@guid, @listId, @text, @done, @sortOrder); + """; + cmd.Parameters.AddWithValue("@guid", item.Id.ToString("D")); + cmd.Parameters.AddWithValue("@listId", listRowId); + cmd.Parameters.AddWithValue("@text", item.Text); + cmd.Parameters.AddWithValue("@done", item.Done ? 1 : 0); + cmd.Parameters.AddWithValue("@sortOrder", item.SortOrder); + cmd.ExecuteNonQuery(); + } + + private static void UpdateItemRow(SqliteConnection conn, TodoItem item) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + UPDATE todo_items SET text = @text, done = @done, sort_order = @sortOrder + WHERE guid = @guid; + """; + cmd.Parameters.AddWithValue("@guid", item.Id.ToString("D")); + cmd.Parameters.AddWithValue("@text", item.Text); + cmd.Parameters.AddWithValue("@done", item.Done ? 1 : 0); + cmd.Parameters.AddWithValue("@sortOrder", item.SortOrder); + cmd.ExecuteNonQuery(); + } + + private static bool DeleteItem(SqliteConnection conn, Guid id) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = "DELETE FROM todo_items WHERE guid = @guid;"; + cmd.Parameters.AddWithValue("@guid", id.ToString("D")); + return cmd.ExecuteNonQuery() > 0; + } + + private static TodoItem? ReadItemById(SqliteConnection conn, Guid id) + { + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + SELECT ti.guid, tl.guid, ti.text, ti.done, ti.sort_order + FROM todo_items ti + INNER JOIN todo_lists tl ON tl.id = ti.list_id + WHERE ti.guid = @guid; + """; + cmd.Parameters.AddWithValue("@guid", id.ToString("D")); + + using var reader = cmd.ExecuteReader(); + return reader.Read() ? MapItemRow(reader) : null; + } + + private static List ReadItemsByListId(SqliteConnection conn, Guid listId) + { + var results = new List(); + using var cmd = conn.CreateCommand(); + cmd.CommandText = """ + SELECT ti.guid, tl.guid, ti.text, ti.done, ti.sort_order + FROM todo_items ti + INNER JOIN todo_lists tl ON tl.id = ti.list_id + WHERE tl.guid = @listGuid + ORDER BY ti.sort_order, ti.guid; + """; + cmd.Parameters.AddWithValue("@listGuid", listId.ToString("D")); + + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + results.Add(MapItemRow(reader)); + + return results; + } + + private static TodoItem MapItemRow(SqliteDataReader reader) + { + var guid = Guid.Parse(reader.GetString(0)); + var listGuid = Guid.Parse(reader.GetString(1)); + var text = reader.GetString(2); + var done = !reader.IsDBNull(3) && reader.GetInt64(3) != 0; + var sortOrder = reader.IsDBNull(4) ? 0 : (int)reader.GetInt64(4); + return new TodoItem(guid, listGuid, text, done, sortOrder); + } +} diff --git a/Journal.Core/ServiceCollectionExtensions.cs b/Journal.Core/ServiceCollectionExtensions.cs new file mode 100644 index 0000000..649d8a3 --- /dev/null +++ b/Journal.Core/ServiceCollectionExtensions.cs @@ -0,0 +1,71 @@ +using Microsoft.Extensions.DependencyInjection; +using Journal.Core.Repositories; +using Journal.Core.Services.Ai; +using Journal.Core.Services.Config; +using Journal.Core.Services.Database; +using Journal.Core.Services.Entries; +using Journal.Core.Services.Fragments; +using Journal.Core.Services.Lists; +using Journal.Core.Services.Logging; +using Journal.Core.Services.Sidecar; +using Journal.Core.Services.Speech; +using Journal.Core.Services.Todos; +using Journal.Core.Services.Vault; + +namespace Journal.Core; + +public static class ServiceCollectionExtensions +{ + public static IServiceCollection AddFragmentServices(this IServiceCollection services) + { + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddTransient(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(provider => + { + var config = provider.GetRequiredService().Current; + if (!string.Equals(config.AiProvider, "python-sidecar", StringComparison.OrdinalIgnoreCase)) + return new DisabledAiService(config.AiProvider); + + try + { + return new PythonSidecarAiService(config); + } + catch (Exception ex) + { + return new DisabledAiService( + provider: "python-sidecar", + message: $"Python AI sidecar unavailable: {ex.Message}", + healthy: false); + } + }); + services.AddSingleton(provider => + { + var config = provider.GetRequiredService().Current; + try + { + return new PythonSidecarSpeechService(config); + } + catch (Exception ex) + { + return new DisabledSpeechBridgeService( + provider: "python-sidecar", + message: $"Python speech sidecar unavailable: {ex.Message}"); + } + }); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + return services; + } +} diff --git a/Journal.Core/Services/Ai/DisabledAiService.cs b/Journal.Core/Services/Ai/DisabledAiService.cs new file mode 100644 index 0000000..d5a7ad6 --- /dev/null +++ b/Journal.Core/Services/Ai/DisabledAiService.cs @@ -0,0 +1,25 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Ai; + +public sealed class DisabledAiService(string provider, string message = "AI provider disabled.", bool healthy = true) : IAiService +{ + private readonly string _provider = string.IsNullOrWhiteSpace(provider) ? "none" : provider.Trim(); + private readonly string _message = string.IsNullOrWhiteSpace(message) ? "AI provider disabled." : message.Trim(); + private readonly bool _healthy = healthy; + + public Task HealthAsync(CancellationToken cancellationToken = default) => + Task.FromResult(new AiHealthDto(_provider, Enabled: false, Healthy: _healthy, Message: _message)); + + public Task SummarizeEntryAsync(string content, string? fileStem = null, CancellationToken cancellationToken = default) => + Task.FromResult(_message); + + public Task SummarizeAllAsync(IReadOnlyList entries, CancellationToken cancellationToken = default) => + Task.FromResult(_message); + + public Task ChatAsync(string prompt, CancellationToken cancellationToken = default) => + Task.FromResult(_message); + + public Task> EmbedAsync(string content, CancellationToken cancellationToken = default) => + Task.FromResult>([]); +} diff --git a/Journal.Core/Services/Ai/IAiService.cs b/Journal.Core/Services/Ai/IAiService.cs new file mode 100644 index 0000000..5300641 --- /dev/null +++ b/Journal.Core/Services/Ai/IAiService.cs @@ -0,0 +1,12 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Ai; + +public interface IAiService +{ + Task HealthAsync(CancellationToken cancellationToken = default); + Task SummarizeEntryAsync(string content, string? fileStem = null, CancellationToken cancellationToken = default); + Task SummarizeAllAsync(IReadOnlyList entries, CancellationToken cancellationToken = default); + Task ChatAsync(string prompt, CancellationToken cancellationToken = default); + Task> EmbedAsync(string content, CancellationToken cancellationToken = default); +} diff --git a/Journal.Core/Services/Ai/PythonSidecarAiService.cs b/Journal.Core/Services/Ai/PythonSidecarAiService.cs new file mode 100644 index 0000000..daba179 --- /dev/null +++ b/Journal.Core/Services/Ai/PythonSidecarAiService.cs @@ -0,0 +1,86 @@ +using System.Text.Json; +using Journal.Core.Dtos; +using Journal.Core.Models; +using Journal.Core.Services.Sidecar; + +namespace Journal.Core.Services.Ai; + +public sealed class PythonSidecarAiService : IAiService +{ + private readonly PythonSidecarClient _client; + + public PythonSidecarAiService(JournalConfig config) + { + if (string.IsNullOrWhiteSpace(config.PythonAiSidecarPath)) + throw new ArgumentException("Python AI sidecar path is required."); + if (!File.Exists(config.PythonAiSidecarPath)) + throw new FileNotFoundException($"Python AI sidecar not found: {config.PythonAiSidecarPath}"); + _client = new PythonSidecarClient(config); + } + + public async Task HealthAsync(CancellationToken cancellationToken = default) + { + var data = await _client.SendAsync("health", payload: new { }, cancellationToken); + if (data is not JsonElement payload || payload.ValueKind != JsonValueKind.Object) + return new AiHealthDto("python-sidecar", Enabled: true, Healthy: true, Message: "ok"); + + var provider = payload.TryGetProperty("provider", out var providerNode) + ? providerNode.GetString() ?? "python-sidecar" + : "python-sidecar"; + var message = payload.TryGetProperty("message", out var messageNode) + ? messageNode.GetString() ?? "ok" + : "ok"; + var healthy = !payload.TryGetProperty("healthy", out var healthyNode) || + healthyNode.ValueKind is JsonValueKind.True || + (healthyNode.ValueKind is not JsonValueKind.False); + return new AiHealthDto(provider, Enabled: true, Healthy: healthy, Message: message); + } + + public async Task SummarizeEntryAsync(string content, string? fileStem = null, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(content)) + throw new ArgumentException("Entry content is required.", nameof(content)); + + var data = await _client.SendAsync("summarize_entry", new { content, file_stem = fileStem }, cancellationToken); + return data?.GetString() ?? ""; + } + + public async Task SummarizeAllAsync(IReadOnlyList entries, CancellationToken cancellationToken = default) + { + entries ??= []; + var data = await _client.SendAsync("summarize_all", new { entries }, cancellationToken); + return data?.GetString() ?? ""; + } + + public async Task ChatAsync(string prompt, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(prompt)) + throw new ArgumentException("Prompt is required.", nameof(prompt)); + + var data = await _client.SendAsync("chat", new { prompt }, cancellationToken); + return data?.GetString() ?? ""; + } + + public async Task> EmbedAsync(string content, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(content)) + throw new ArgumentException("Content is required.", nameof(content)); + + var data = await _client.SendAsync("embed", new { content }, cancellationToken); + if (data is null || data.Value.ValueKind == JsonValueKind.Null) + return []; + + if (data.Value.ValueKind != JsonValueKind.Array) + throw new InvalidOperationException("Python AI sidecar embed response must be a numeric array."); + + var values = new List(); + foreach (var item in data.Value.EnumerateArray()) + { + if (item.ValueKind != JsonValueKind.Number) + throw new InvalidOperationException("Python AI sidecar embed response contains a non-numeric value."); + values.Add(item.GetDouble()); + } + + return values; + } +} diff --git a/Journal.Core/Services/Config/IJournalConfigService.cs b/Journal.Core/Services/Config/IJournalConfigService.cs new file mode 100644 index 0000000..5da1f33 --- /dev/null +++ b/Journal.Core/Services/Config/IJournalConfigService.cs @@ -0,0 +1,8 @@ +using Journal.Core.Models; + +namespace Journal.Core.Services.Config; + +public interface IJournalConfigService +{ + JournalConfig Current { get; } +} diff --git a/Journal.Core/Services/Config/JournalConfigService.cs b/Journal.Core/Services/Config/JournalConfigService.cs new file mode 100644 index 0000000..f33a9c1 --- /dev/null +++ b/Journal.Core/Services/Config/JournalConfigService.cs @@ -0,0 +1,108 @@ +using Journal.Core.Models; + +namespace Journal.Core.Services.Config; + +public sealed class JournalConfigService : IJournalConfigService +{ + public JournalConfig Current => BuildConfig(); + + private static JournalConfig BuildConfig() + { + var projectRoot = ResolveProjectRoot(); + var appDirectory = ResolvePath("JOURNAL_APP_DIR", Path.Combine(projectRoot, "journal")); + + var dataDirectory = ResolvePath("JOURNAL_DATA_DIR", Path.Combine(appDirectory, "data")); + var vaultDirectory = ResolvePath("JOURNAL_VAULT_DIR", Path.Combine(appDirectory, "vault")); + var logDirectory = ResolvePath("JOURNAL_LOG_DIR", Path.Combine(projectRoot, "logs")); + + var pidFile = ResolvePath("JOURNAL_PID_FILE", Path.Combine(logDirectory, "nicegui_server.pid")); + var serverControlFile = ResolvePath("JOURNAL_SERVER_CONTROL_FILE", Path.Combine(logDirectory, "server_control.action")); + + var nlpBackend = (Environment.GetEnvironmentVariable("JOURNAL_NLP_BACKEND") ?? "auto").Trim().ToLowerInvariant(); + if (nlpBackend is not ("auto" or "spacy" or "fallback")) + nlpBackend = "auto"; + + var aiProvider = (Environment.GetEnvironmentVariable("JOURNAL_AI_PROVIDER") ?? "none").Trim().ToLowerInvariant(); + if (aiProvider is not ("none" or "python-sidecar")) + aiProvider = "none"; + + var pythonExecutable = Environment.GetEnvironmentVariable("JOURNAL_PYTHON_EXE"); + if (string.IsNullOrWhiteSpace(pythonExecutable)) + pythonExecutable = "python"; + + var defaultAiSidecarPath = Path.Combine(projectRoot, "journal", "ai", "sidecar.py"); + var pythonAiSidecarPath = ResolvePath("JOURNAL_AI_SIDECAR_PATH", defaultAiSidecarPath); + var aiSidecarTimeoutMs = ParseInt("JOURNAL_AI_TIMEOUT_MS", 45000); + + return new JournalConfig( + ProjectRoot: projectRoot, + AppDirectory: appDirectory, + DataDirectory: dataDirectory, + VaultDirectory: vaultDirectory, + LogDirectory: logDirectory, + PidFile: pidFile, + ServerControlFile: serverControlFile, + DatabaseFilename: Environment.GetEnvironmentVariable("JOURNAL_DATABASE_FILENAME") ?? "journal_cache.db", + MonthlyVaultFormat: Environment.GetEnvironmentVariable("JOURNAL_MONTHLY_VAULT_FORMAT") ?? "%Y-%m.vault", + CloudAiApiKey: Environment.GetEnvironmentVariable("CLOUDAI_API_KEY") ?? "", + CloudAiApiUrl: Environment.GetEnvironmentVariable("CLOUDAI_API_URL") ?? "", + LlamaCppUrl: Environment.GetEnvironmentVariable("LLAMA_CPP_URL") ?? "http://127.0.0.1:8085/v1/completions", + LlamaCppModel: Environment.GetEnvironmentVariable("LLAMA_CPP_MODEL") ?? "qwen/qwen3-4b", + LlamaCppTimeout: ParseInt("LLAMA_CPP_TIMEOUT", 6000), + EmbeddingApiUrl: Environment.GetEnvironmentVariable("EMBEDDING_API_URL") ?? "http://127.0.0.1:8086/v1/embeddings", + EmbeddingModelName: Environment.GetEnvironmentVariable("EMBEDDING_MODEL_NAME") ?? "text-embedding-nomic-embed-text-v2-moe", + ModelContextTokens: ParseInt("MODEL_CONTEXT_TOKENS", 131072), + ChunkTokenBudget: ParseInt("CHUNK_TOKEN_BUDGET", 120000), + MicrophoneDeviceIndex: ParseNullableInt("MICROPHONE_DEVICE_INDEX"), + SpeechRecognitionEngine: Environment.GetEnvironmentVariable("SPEECH_RECOGNITION_ENGINE") ?? "whisper", + WhisperModelSize: Environment.GetEnvironmentVariable("WHISPER_MODEL_SIZE") ?? "base", + NlpBackend: nlpBackend, + AiProvider: aiProvider, + PythonExecutable: pythonExecutable, + PythonAiSidecarPath: pythonAiSidecarPath, + AiSidecarTimeoutMs: aiSidecarTimeoutMs); + } + + private static string ResolveProjectRoot() + { + var envRoot = Environment.GetEnvironmentVariable("JOURNAL_PROJECT_ROOT"); + if (!string.IsNullOrWhiteSpace(envRoot)) + return Path.GetFullPath(envRoot); + + var cwd = Directory.GetCurrentDirectory(); + if (Directory.Exists(Path.Combine(cwd, "journal"))) + return Path.GetFullPath(cwd); + + var upOne = Path.GetFullPath(Path.Combine(cwd, "..")); + if (Directory.Exists(Path.Combine(upOne, "journal"))) + return upOne; + + var upTwo = Path.GetFullPath(Path.Combine(cwd, "..", "..")); + if (Directory.Exists(Path.Combine(upTwo, "journal"))) + return upTwo; + + return Path.GetFullPath(cwd); + } + + private static string ResolvePath(string envVar, string defaultPath) + { + var value = Environment.GetEnvironmentVariable(envVar); + var raw = string.IsNullOrWhiteSpace(value) ? defaultPath : value; + return Path.GetFullPath(raw); + } + + private static int ParseInt(string envVar, int defaultValue) + { + var value = Environment.GetEnvironmentVariable(envVar); + return int.TryParse(value, out var parsed) ? parsed : defaultValue; + } + + private static int? ParseNullableInt(string envVar) + { + var value = Environment.GetEnvironmentVariable(envVar); + if (string.IsNullOrWhiteSpace(value)) + return null; + return int.TryParse(value, out var parsed) ? parsed : null; + } +} + diff --git a/Journal.Core/Services/Database/DatabaseSessionService.cs b/Journal.Core/Services/Database/DatabaseSessionService.cs new file mode 100644 index 0000000..67e3f11 --- /dev/null +++ b/Journal.Core/Services/Database/DatabaseSessionService.cs @@ -0,0 +1,87 @@ +using Microsoft.Data.Sqlite; + +namespace Journal.Core.Services.Database; + +public sealed class DatabaseSessionService(IJournalDatabaseService database) : IDatabaseSessionService, IDisposable +{ + private readonly IJournalDatabaseService _database = database; + private readonly Lock _lock = new(); + private string? _password; + private string? _dataDirectory; + private SqliteConnection? _connection; + + public bool IsUnlocked + { + get + { + lock (_lock) { return _password is not null; } + } + } + + public void SetPassword(string password, string? dataDirectory = null) + { + if (string.IsNullOrWhiteSpace(password)) + throw new ArgumentException("Password cannot be empty.", nameof(password)); + + lock (_lock) + { + if (_connection is not null && + (_password != password || _dataDirectory != dataDirectory)) + { + _connection.Dispose(); + _connection = null; + } + + _password = password; + _dataDirectory = dataDirectory; + } + } + + public bool TryGetSession(out string password, out string? dataDirectory) + { + lock (_lock) + { + if (string.IsNullOrWhiteSpace(_password)) + { + password = ""; + dataDirectory = null; + return false; + } + + password = _password; + dataDirectory = _dataDirectory; + return true; + } + } + + public SqliteConnection GetConnection() + { + lock (_lock) + { + if (_password is null) + throw new InvalidOperationException( + "Database is locked. Authenticate first (e.g. vault.load_all or db.hydrate_workspace)."); + + if (_connection is not null) + return _connection; + + _connection = _database.OpenEncryptedConnection(_password, _dataDirectory); + _database.EnsureSchema(_connection); + return _connection; + } + } + + public void CloseConnection() + { + lock (_lock) + { + _connection?.Dispose(); + _connection = null; + } + } + + public void Dispose() + { + CloseConnection(); + } +} diff --git a/Journal.Core/Services/Database/IDatabaseSessionService.cs b/Journal.Core/Services/Database/IDatabaseSessionService.cs new file mode 100644 index 0000000..6c29e85 --- /dev/null +++ b/Journal.Core/Services/Database/IDatabaseSessionService.cs @@ -0,0 +1,12 @@ +using Microsoft.Data.Sqlite; + +namespace Journal.Core.Services.Database; + +public interface IDatabaseSessionService +{ + bool IsUnlocked { get; } + void SetPassword(string password, string? dataDirectory = null); + bool TryGetSession(out string password, out string? dataDirectory); + SqliteConnection GetConnection(); + void CloseConnection(); +} diff --git a/Journal.Core/Services/Database/IJournalDatabaseService.cs b/Journal.Core/Services/Database/IJournalDatabaseService.cs new file mode 100644 index 0000000..8d240fd --- /dev/null +++ b/Journal.Core/Services/Database/IJournalDatabaseService.cs @@ -0,0 +1,17 @@ +using Journal.Core.Dtos; +using Microsoft.Data.Sqlite; + +namespace Journal.Core.Services.Database; + +public interface IJournalDatabaseService +{ + string GetDatabasePath(string? dataDirectory = null); + byte[] DeriveDatabaseKey(string password); + string BuildPragmaKeyStatement(string password); + IReadOnlyDictionary GetSchemaStatements(); + SqliteConnection OpenEncryptedConnection(string password, string? dataDirectory = null); + void EnsureSchema(SqliteConnection connection); + string WriteSchemaBootstrap(string? dataDirectory = null); + JournalDatabaseStatus GetStatus(string password, string? dataDirectory = null); + JournalDatabaseHydrationResult HydrateWorkspace(string password, string? dataDirectory = null); +} diff --git a/Journal.Core/Services/Database/JournalDatabaseService.cs b/Journal.Core/Services/Database/JournalDatabaseService.cs new file mode 100644 index 0000000..ae0c147 --- /dev/null +++ b/Journal.Core/Services/Database/JournalDatabaseService.cs @@ -0,0 +1,260 @@ +using System.Security.Cryptography; +using System.Text; +using Journal.Core.Dtos; +using Journal.Core.Services.Config; +using Microsoft.Data.Sqlite; + +namespace Journal.Core.Services.Database; + +public sealed class JournalDatabaseService(IJournalConfigService config) : IJournalDatabaseService +{ + public const int KeySize = 32; + public const int Iterations = 600_000; + private static readonly byte[] DatabaseKeySalt = Encoding.UTF8.GetBytes("a_fixed_salt_for_the_db_key_deriv"); + private static readonly Lock SqliteInitLock = new(); + private static bool _sqliteInitialized; + private static readonly IReadOnlyList RequiredSchemaTables = + ["entries", "sections", "fragments", "tags", "fragment_tags", "lists", "todo_lists", "todo_items"]; + + private readonly IJournalConfigService _config = config; + + public string GetDatabasePath(string? dataDirectory = null) + { + var directory = string.IsNullOrWhiteSpace(dataDirectory) + ? _config.Current.DataDirectory + : dataDirectory; + + Directory.CreateDirectory(directory); + return Path.GetFullPath(Path.Combine(directory, _config.Current.DatabaseFilename)); + } + + public byte[] DeriveDatabaseKey(string password) + { + if (string.IsNullOrWhiteSpace(password)) + throw new ArgumentException("Password cannot be empty.", nameof(password)); + + return Rfc2898DeriveBytes.Pbkdf2( + Encoding.UTF8.GetBytes(password), + DatabaseKeySalt, + Iterations, + HashAlgorithmName.SHA256, + KeySize); + } + + public string BuildPragmaKeyStatement(string password) + { + var dbKeyHex = Convert.ToHexString(DeriveDatabaseKey(password)).ToLowerInvariant(); + return $"PRAGMA key = \"x'{dbKeyHex}'\""; + } + + public IReadOnlyDictionary GetSchemaStatements() + { + return new Dictionary(StringComparer.Ordinal) + { + ["entries"] = """ + CREATE TABLE IF NOT EXISTS entries ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + date TEXT NOT NULL UNIQUE + ); + """, + ["sections"] = """ + CREATE TABLE IF NOT EXISTS sections ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + entry_id INTEGER NOT NULL, + title TEXT NOT NULL, + content TEXT, + FOREIGN KEY (entry_id) REFERENCES entries (id) + ); + """, + ["fragments"] = """ + CREATE TABLE IF NOT EXISTS fragments ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + guid TEXT UNIQUE, + entry_id INTEGER, + type TEXT NOT NULL, + description TEXT, + time TEXT, + FOREIGN KEY (entry_id) REFERENCES entries (id) + ); + """, + ["tags"] = """ + CREATE TABLE IF NOT EXISTS tags ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL UNIQUE + ); + """, + ["fragment_tags"] = """ + CREATE TABLE IF NOT EXISTS fragment_tags ( + fragment_id INTEGER NOT NULL, + tag_id INTEGER NOT NULL, + PRIMARY KEY (fragment_id, tag_id), + FOREIGN KEY (fragment_id) REFERENCES fragments (id), + FOREIGN KEY (tag_id) REFERENCES tags (id) + ); + """, + ["lists"] = """ + CREATE TABLE IF NOT EXISTS lists ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + guid TEXT UNIQUE, + label TEXT NOT NULL, + content TEXT, + created_at TEXT, + updated_at TEXT + ); + """, + ["todo_lists"] = """ + CREATE TABLE IF NOT EXISTS todo_lists ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + guid TEXT UNIQUE, + label TEXT NOT NULL, + created_at TEXT + ); + """, + ["todo_items"] = """ + CREATE TABLE IF NOT EXISTS todo_items ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + guid TEXT UNIQUE, + list_id INTEGER NOT NULL, + text TEXT NOT NULL, + done INTEGER DEFAULT 0, + sort_order INTEGER DEFAULT 0, + FOREIGN KEY (list_id) REFERENCES todo_lists (id) + ); + """ + }; + } + + public string WriteSchemaBootstrap(string? dataDirectory = null) + { + var directory = string.IsNullOrWhiteSpace(dataDirectory) + ? _config.Current.DataDirectory + : dataDirectory; + Directory.CreateDirectory(directory); + + var bootstrapPath = Path.GetFullPath(Path.Combine(directory, "journal_schema.sql")); + var statements = GetSchemaStatements() + .Select(pair => $"-- {pair.Key}\n{pair.Value.Trim()}") + .ToArray(); + var content = string.Join("\n\n", statements) + "\n"; + File.WriteAllText(bootstrapPath, content); + return bootstrapPath; + } + + public JournalDatabaseStatus GetStatus(string password, string? dataDirectory = null) + { + var tables = GetSchemaStatements().Keys.OrderBy(x => x, StringComparer.Ordinal).ToArray(); + var bootstrapPath = WriteSchemaBootstrap(dataDirectory); + var runtime = ProbeRuntime(password, dataDirectory); + return new JournalDatabaseStatus( + DatabasePath: GetDatabasePath(dataDirectory), + KeyLengthBytes: DeriveDatabaseKey(password).Length, + Iterations: Iterations, + KeyDerivation: "PBKDF2-HMAC-SHA256", + SchemaTables: tables, + SchemaBootstrapPath: bootstrapPath, + RuntimeReady: runtime.Ready, + RuntimeMessage: runtime.Message); + } + + public JournalDatabaseHydrationResult HydrateWorkspace(string password, string? dataDirectory = null) + { + var directory = string.IsNullOrWhiteSpace(dataDirectory) + ? _config.Current.DataDirectory + : dataDirectory; + Directory.CreateDirectory(directory); + + using var connection = OpenEncryptedConnection(password, directory); + EnsureSchema(connection); + var runtimeReady = HasRequiredTables(connection); + + var entryFilesProcessed = Directory.GetFiles(directory, "*.md", SearchOption.TopDirectoryOnly).Length; + var schemaPath = WriteSchemaBootstrap(directory); + + return new JournalDatabaseHydrationResult( + DatabasePath: GetDatabasePath(directory), + SchemaBootstrapPath: schemaPath, + EntryFilesProcessed: entryFilesProcessed, + RuntimeReady: runtimeReady, + Message: runtimeReady + ? "Workspace hydration completed with SQLCipher runtime schema validation." + : "Workspace hydration completed, but required schema tables were not found."); + } + + private static void EnsureSqliteInitialized() + { + if (_sqliteInitialized) + return; + + lock (SqliteInitLock) + { + if (_sqliteInitialized) + return; + + SQLitePCL.Batteries_V2.Init(); + _sqliteInitialized = true; + } + } + + public SqliteConnection OpenEncryptedConnection(string password, string? dataDirectory = null) + { + if (string.IsNullOrWhiteSpace(password)) + throw new ArgumentException("Password cannot be empty.", nameof(password)); + + EnsureSqliteInitialized(); + + var connection = new SqliteConnection($"Data Source={GetDatabasePath(dataDirectory)};Mode=ReadWriteCreate;Pooling=False"); + connection.Open(); + + using var keyCmd = connection.CreateCommand(); + keyCmd.CommandText = BuildPragmaKeyStatement(password) + ";"; + keyCmd.ExecuteNonQuery(); + + using var verifyCmd = connection.CreateCommand(); + verifyCmd.CommandText = "SELECT count(*) FROM sqlite_master;"; + _ = verifyCmd.ExecuteScalar(); + + return connection; + } + + public void EnsureSchema(SqliteConnection connection) + { + foreach (var statement in GetSchemaStatements().Values) + { + using var cmd = connection.CreateCommand(); + cmd.CommandText = statement; + cmd.ExecuteNonQuery(); + } + } + + private static bool HasRequiredTables(SqliteConnection connection) + { + var existing = new HashSet(StringComparer.OrdinalIgnoreCase); + using var cmd = connection.CreateCommand(); + cmd.CommandText = "SELECT name FROM sqlite_master WHERE type='table'"; + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + { + if (!reader.IsDBNull(0)) + existing.Add(reader.GetString(0)); + } + + return RequiredSchemaTables.All(existing.Contains); + } + + private (bool Ready, string Message) ProbeRuntime(string password, string? dataDirectory) + { + try + { + using var connection = OpenEncryptedConnection(password, dataDirectory); + EnsureSchema(connection); + var ready = HasRequiredTables(connection); + return ready + ? (true, "SQLCipher runtime is available and schema tables are present.") + : (false, "SQLCipher runtime opened, but required schema tables are missing."); + } + catch (Exception ex) + { + return (false, $"SQLCipher runtime check failed: {ex.Message}"); + } + } +} diff --git a/Journal.Core/Services/Entries/EntryFileNaming.cs b/Journal.Core/Services/Entries/EntryFileNaming.cs new file mode 100644 index 0000000..7b800dd --- /dev/null +++ b/Journal.Core/Services/Entries/EntryFileNaming.cs @@ -0,0 +1,9 @@ +namespace Journal.Core.Services.Entries; + +internal static class EntryFileNaming +{ + internal const string TemplateSuffix = ".template.md"; + + internal static bool IsTemplateFileName(string fileName) + => fileName.EndsWith(TemplateSuffix, StringComparison.OrdinalIgnoreCase); +} diff --git a/Journal.Core/Services/Entries/EntryFileService.cs b/Journal.Core/Services/Entries/EntryFileService.cs new file mode 100644 index 0000000..450e859 --- /dev/null +++ b/Journal.Core/Services/Entries/EntryFileService.cs @@ -0,0 +1,170 @@ +using Journal.Core.Dtos; +using Journal.Core.Repositories; + +namespace Journal.Core.Services.Entries; + +public sealed class EntryFileService(IEntryFileRepository repo) : IEntryFileService +{ + private readonly IEntryFileRepository _repo = repo ?? throw new ArgumentNullException(nameof(repo)); + + public IReadOnlyList ListEntries(string dataDirectory) + { + return [.. _repo.ListMarkdownFiles(dataDirectory) + .Where(path => !EntryFileNaming.IsTemplateFileName(_repo.GetFileName(path))) + .Select(path => new EntryListItem( + FileName: _repo.GetFileName(path), + FilePath: _repo.GetFullPath(path)))]; + } + + public IReadOnlyList ListTemplates(string dataDirectory) + { + return [.. _repo.ListMarkdownFiles(dataDirectory) + .Where(path => EntryFileNaming.IsTemplateFileName(_repo.GetFileName(path))) + .Select(path => new EntryListItem( + FileName: _repo.GetFileName(path), + FilePath: _repo.GetFullPath(path)))]; + } + + public EntryLoadResult LoadEntry(string filePath) + { + var normalizedPath = _repo.GetFullPath(filePath); + if (!_repo.FileExists(normalizedPath)) + throw new FileNotFoundException($"Entry file not found: {normalizedPath}"); + + var rawContent = HtmlSanitizer.StripRichHtml(_repo.ReadFile(normalizedPath)); + var fileStem = _repo.GetFileNameWithoutExtension(normalizedPath); + var entry = JournalParser.ParseJournalContent(rawContent, fileStem); + + return new EntryLoadResult( + FileName: _repo.GetFileName(normalizedPath), + FilePath: normalizedPath, + Entry: entry.ToDto()); + } + + public EntryTemplateLoadResult LoadTemplate(string filePath) + { + var normalizedPath = _repo.GetFullPath(filePath); + if (!_repo.FileExists(normalizedPath)) + throw new FileNotFoundException($"Template file not found: {normalizedPath}"); + + var fileName = _repo.GetFileName(normalizedPath); + if (!EntryFileNaming.IsTemplateFileName(fileName)) + throw new ArgumentException("Template file name must end with .template.md."); + + var rawContent = HtmlSanitizer.StripRichHtml(_repo.ReadFile(normalizedPath)); + return new EntryTemplateLoadResult(fileName, normalizedPath, rawContent); + } + + public EntrySaveResult SaveEntry(EntrySavePayload payload, string defaultDataDirectory) + { + var targetPath = ResolveTargetPath(payload.FilePath, payload.FileName, defaultDataDirectory); + var mode = string.IsNullOrWhiteSpace(payload.Mode) ? "Daily" : payload.Mode.Trim(); + var sanitizedContent = HtmlSanitizer.StripRichHtml(payload.Content ?? ""); + _repo.EnsureDirectory(targetPath); + + if (string.Equals(mode, "Overwrite", StringComparison.OrdinalIgnoreCase)) + { + _repo.WriteFile(targetPath, sanitizedContent); + return new EntrySaveResult(targetPath); + } + + if (string.Equals(mode, "Fragment", StringComparison.OrdinalIgnoreCase)) + { + _repo.AppendFile(targetPath, "\n\n" + sanitizedContent.Trim()); + return new EntrySaveResult(targetPath); + } + + string finalContent; + if (_repo.FileExists(targetPath)) + { + var existingContent = _repo.ReadFile(targetPath); + var fileStem = _repo.GetFileNameWithoutExtension(targetPath); + var existingEntry = JournalParser.ParseJournalContent(existingContent, fileStem); + var newEntryData = JournalParser.ParseJournalContent(sanitizedContent, fileStem); + existingEntry.MergeWith(newEntryData); + finalContent = existingEntry.ToMarkdown(); + } + else + { + finalContent = sanitizedContent; + } + + _repo.WriteFile(targetPath, finalContent); + return new EntrySaveResult(targetPath); + } + + public EntrySaveResult SaveTemplate(EntryTemplateSavePayload payload, string defaultDataDirectory) + { + ArgumentNullException.ThrowIfNull(payload); + if (string.IsNullOrWhiteSpace(payload.Name)) + throw new ArgumentException("Template name is required."); + + var directory = string.IsNullOrWhiteSpace(payload.DataDirectory) + ? defaultDataDirectory + : payload.DataDirectory; + var targetPath = ResolveTemplatePath(payload.FilePath, payload.Name, directory); + var fileName = _repo.GetFileName(targetPath); + if (!EntryFileNaming.IsTemplateFileName(fileName)) + throw new ArgumentException("Template file name must end with .template.md."); + + var sanitizedContent = HtmlSanitizer.StripRichHtml(payload.Content ?? ""); + _repo.EnsureDirectory(targetPath); + _repo.WriteFile(targetPath, sanitizedContent); + return new EntrySaveResult(targetPath); + } + + public bool DeleteEntry(string filePath) + { + var normalizedPath = _repo.GetFullPath(filePath); + if (!_repo.FileExists(normalizedPath)) + return false; + _repo.DeleteFile(normalizedPath); + return true; + } + + public bool DeleteTemplate(string filePath) + { + var normalizedPath = _repo.GetFullPath(filePath); + if (!_repo.FileExists(normalizedPath)) + return false; + + var fileName = _repo.GetFileName(normalizedPath); + if (!EntryFileNaming.IsTemplateFileName(fileName)) + return false; + + _repo.DeleteFile(normalizedPath); + return true; + } + + private string ResolveTargetPath(string? filePath, string? fileName, string defaultDataDirectory) + { + if (!string.IsNullOrWhiteSpace(filePath)) + return _repo.GetFullPath(filePath); + + var name = !string.IsNullOrWhiteSpace(fileName) + ? SanitizeFileName(fileName) + : $"{DateTime.Now:yyyy-MM-dd}"; + + return _repo.GetFullPath(Path.Combine(defaultDataDirectory, $"{name}.md")); + } + + private string ResolveTemplatePath(string? filePath, string templateName, string defaultDataDirectory) + { + if (!string.IsNullOrWhiteSpace(filePath)) + return _repo.GetFullPath(filePath); + + var name = SanitizeFileName(templateName); + return _repo.GetFullPath(Path.Combine(defaultDataDirectory, $"{name}{EntryFileNaming.TemplateSuffix}")); + } + + private static string SanitizeFileName(string name) + { + var trimmed = name.Trim(); + if (trimmed.EndsWith(".md", StringComparison.OrdinalIgnoreCase)) + trimmed = trimmed[..^3]; + + var invalid = Path.GetInvalidFileNameChars(); + var sanitized = new string(trimmed.Select(c => Array.IndexOf(invalid, c) >= 0 ? '_' : c).ToArray()); + return string.IsNullOrWhiteSpace(sanitized) ? "untitled" : sanitized; + } +} diff --git a/Journal.Core/Services/Entries/EntrySearchService.cs b/Journal.Core/Services/Entries/EntrySearchService.cs new file mode 100644 index 0000000..b1df327 --- /dev/null +++ b/Journal.Core/Services/Entries/EntrySearchService.cs @@ -0,0 +1,111 @@ +using Journal.Core.Dtos; +using System.Globalization; + +namespace Journal.Core.Services.Entries; + +public class EntrySearchService : IEntrySearchService +{ + public Task> SearchEntriesAsync(EntrySearchRequestDto request) + { + ArgumentNullException.ThrowIfNull(request); + if (string.IsNullOrWhiteSpace(request.DataDirectory)) + throw new ArgumentException("Data directory is required.", nameof(request.DataDirectory)); + + if (!Directory.Exists(request.DataDirectory)) + return Task.FromResult>([]); + + var hasQuery = !string.IsNullOrWhiteSpace(request.Query); + var query = request.Query?.Trim() ?? ""; + var hasSectionFilter = !string.IsNullOrWhiteSpace(request.Section); + var section = request.Section?.Trim() ?? ""; + + var typeSet = NormalizeSet(request.Types); + var tagSet = NormalizeSet(request.Tags); + var checkedSet = NormalizeSet(request.Checked); + var uncheckedSet = NormalizeSet(request.Unchecked); + var hasFragmentFilters = typeSet.Count > 0 || tagSet.Count > 0; + var hasCheckboxFilters = checkedSet.Count > 0 || uncheckedSet.Count > 0; + + var startDate = ParseOptionalDate(request.StartDate, nameof(request.StartDate)); + var endDate = ParseOptionalDate(request.EndDate, nameof(request.EndDate)); + if (startDate.HasValue && endDate.HasValue && startDate.Value > endDate.Value) + throw new ArgumentException("startDate cannot be after endDate."); + + var results = new List(); + foreach (var filePath in Directory.GetFiles(request.DataDirectory, "*.md") + .OrderBy(Path.GetFileName, StringComparer.Ordinal)) + { + var fileName = Path.GetFileName(filePath); + if (EntryFileNaming.IsTemplateFileName(fileName)) + continue; + + var fileStem = Path.GetFileNameWithoutExtension(filePath); + var rawContent = File.ReadAllText(filePath); + var entry = JournalParser.ParseJournalContent(rawContent, fileStem); + + if (startDate.HasValue || endDate.HasValue) + { + if (!DateOnly.TryParseExact(entry.Date, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var entryDate)) + continue; + + if (startDate.HasValue && entryDate < startDate.Value) + continue; + if (endDate.HasValue && entryDate > endDate.Value) + continue; + } + + var contentMatch = true; + if (hasQuery) + { + var haystack = hasSectionFilter ? entry.GetSection(section) : entry.RawContent; + contentMatch = haystack.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0; + } + if (!contentMatch) + continue; + + var fragmentMatch = !hasFragmentFilters || entry.Fragments.Any(fragment => + (typeSet.Count == 0 || typeSet.Contains(fragment.Type)) && + (tagSet.Count == 0 || fragment.Tags.Any(tagSet.Contains))); + if (!fragmentMatch) + continue; + + var checkboxMatch = !hasCheckboxFilters || entry.Sections.Values.Any(sectionValue => + sectionValue.Checkboxes.Any(checkbox => + (checkedSet.Count > 0 && checkbox.Value && checkedSet.Contains(checkbox.Key)) || + (uncheckedSet.Count > 0 && !checkbox.Value && uncheckedSet.Contains(checkbox.Key)))); + if (!checkboxMatch) + continue; + + results.Add(new EntrySearchResultDto(fileName, entry.ToDto())); + } + + return Task.FromResult>(results); + } + + private static HashSet NormalizeSet(IReadOnlyList? values) + { + if (values is null || values.Count == 0) + return []; + + var set = new HashSet(StringComparer.Ordinal); + foreach (var value in values) + { + if (string.IsNullOrWhiteSpace(value)) + continue; + set.Add(value.Trim()); + } + + return set; + } + + private static DateOnly? ParseOptionalDate(string? raw, string argumentName) + { + if (string.IsNullOrWhiteSpace(raw)) + return null; + + if (DateOnly.TryParseExact(raw.Trim(), "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var date)) + return date; + + throw new ArgumentException($"Invalid {argumentName} value. Expected yyyy-MM-dd."); + } +} diff --git a/Journal.Core/Services/Entries/HtmlSanitizer.cs b/Journal.Core/Services/Entries/HtmlSanitizer.cs new file mode 100644 index 0000000..7b31c48 --- /dev/null +++ b/Journal.Core/Services/Entries/HtmlSanitizer.cs @@ -0,0 +1,81 @@ +using System.Net; +using System.Text.RegularExpressions; + +namespace Journal.Core.Services.Entries; + +public static partial class HtmlSanitizer +{ + [GeneratedRegex("<(script|style)\\b[^>]*>.*?", RegexOptions.IgnoreCase | RegexOptions.Singleline)] + private static partial Regex ScriptStyleRegex(); + + [GeneratedRegex("", RegexOptions.IgnoreCase)] + private static partial Regex BrTagRegex(); + + [GeneratedRegex("", RegexOptions.IgnoreCase)] + private static partial Regex BlockEndTagRegex(); + + [GeneratedRegex("]*>", RegexOptions.IgnoreCase)] + private static partial Regex LiStartTagRegex(); + + [GeneratedRegex("", RegexOptions.IgnoreCase)] + private static partial Regex LiEndTagRegex(); + + [GeneratedRegex("<(td|th)\\b[^>]*>", RegexOptions.IgnoreCase)] + private static partial Regex CellStartTagRegex(); + + [GeneratedRegex("", RegexOptions.IgnoreCase)] + private static partial Regex CellEndTagRegex(); + + [GeneratedRegex("]*>", RegexOptions.IgnoreCase)] + private static partial Regex HrTagRegex(); + + [GeneratedRegex("<[^>]+>", RegexOptions.Singleline)] + private static partial Regex AllTagsRegex(); + + [GeneratedRegex("[ \\t]{2,}")] + private static partial Regex MultipleSpacesRegex(); + + [GeneratedRegex("\n{3,}")] + private static partial Regex MultipleNewlinesRegex(); + + [GeneratedRegex("]*>")] + private static partial Regex HtmlTagCountRegex(); + public static string StripRichHtml(string content) + { + if (string.IsNullOrWhiteSpace(content)) + return content; + if (!LooksLikeRichHtml(content)) + return content; + + var text = content.Replace("\r\n", "\n").Replace("\r", "\n"); + text = ScriptStyleRegex().Replace(text, ""); + text = BrTagRegex().Replace(text, "\n"); + text = BlockEndTagRegex().Replace(text, "\n"); + text = LiStartTagRegex().Replace(text, "\n- "); + text = LiEndTagRegex().Replace(text, "\n"); + text = CellStartTagRegex().Replace(text, " | "); + text = CellEndTagRegex().Replace(text, " "); + text = HrTagRegex().Replace(text, "\n---\n"); + text = AllTagsRegex().Replace(text, ""); + text = WebUtility.HtmlDecode(text) + .Replace('\u00a0', ' ') + .Replace("\u200b", "", StringComparison.Ordinal); + text = string.Join("\n", text.Split('\n').Select(line => line.TrimEnd())); + text = MultipleSpacesRegex().Replace(text, " "); + text = MultipleNewlinesRegex().Replace(text, "\n\n").Trim(); + return string.IsNullOrEmpty(text) ? content : text; + } + + public static bool LooksLikeRichHtml(string content) + { + var lowered = content.ToLowerInvariant(); + string[] markers = + [ + "", " lowered.Contains(marker, StringComparison.Ordinal))) + return true; + return HtmlTagCountRegex().Matches(lowered).Count >= 8; + } +} diff --git a/Journal.Core/Services/Entries/IEntryFileService.cs b/Journal.Core/Services/Entries/IEntryFileService.cs new file mode 100644 index 0000000..3983272 --- /dev/null +++ b/Journal.Core/Services/Entries/IEntryFileService.cs @@ -0,0 +1,15 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Entries; + +public interface IEntryFileService +{ + IReadOnlyList ListEntries(string dataDirectory); + IReadOnlyList ListTemplates(string dataDirectory); + EntryLoadResult LoadEntry(string filePath); + EntryTemplateLoadResult LoadTemplate(string filePath); + EntrySaveResult SaveEntry(EntrySavePayload payload, string defaultDataDirectory); + EntrySaveResult SaveTemplate(EntryTemplateSavePayload payload, string defaultDataDirectory); + bool DeleteEntry(string filePath); + bool DeleteTemplate(string filePath); +} diff --git a/Journal.Core/Services/Entries/IEntrySearchService.cs b/Journal.Core/Services/Entries/IEntrySearchService.cs new file mode 100644 index 0000000..6a2c24a --- /dev/null +++ b/Journal.Core/Services/Entries/IEntrySearchService.cs @@ -0,0 +1,8 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Entries; + +public interface IEntrySearchService +{ + Task> SearchEntriesAsync(EntrySearchRequestDto request); +} diff --git a/Journal.Core/Services/Entries/JournalEntryDtoMapper.cs b/Journal.Core/Services/Entries/JournalEntryDtoMapper.cs new file mode 100644 index 0000000..1cce1d5 --- /dev/null +++ b/Journal.Core/Services/Entries/JournalEntryDtoMapper.cs @@ -0,0 +1,32 @@ +using Journal.Core.Dtos; +using Journal.Core.Models; + +namespace Journal.Core.Services.Entries; + +internal static class JournalEntryDtoMapper +{ + public static JournalEntryDto ToDto(this JournalEntry entry) + { + ArgumentNullException.ThrowIfNull(entry); + + return new JournalEntryDto( + Date: entry.Date, + Fragments: + [ + .. entry.Fragments.Select(fragment => new FragmentDto( + Id: fragment.Id, + Type: fragment.Type, + Description: fragment.Description, + Time: fragment.Time, + Tags: [.. fragment.Tags])) + ], + RawContent: entry.RawContent, + Sections: entry.Sections.ToDictionary( + section => section.Key, + section => new ParsedSectionDto( + Title: section.Value.Title, + Content: [.. section.Value.Content], + Checkboxes: section.Value.Checkboxes.ToDictionary(checkbox => checkbox.Key, checkbox => checkbox.Value)), + StringComparer.Ordinal)); + } +} diff --git a/Journal.Core/Services/Entries/JournalParser.cs b/Journal.Core/Services/Entries/JournalParser.cs new file mode 100644 index 0000000..7f74811 --- /dev/null +++ b/Journal.Core/Services/Entries/JournalParser.cs @@ -0,0 +1,175 @@ +using System.Text.RegularExpressions; +using Journal.Core.Models; + +namespace Journal.Core.Services.Entries; + +public static partial class JournalParser +{ + [GeneratedRegex(@"(?:\*\*Date:\*\*|\*\*Date:|Date:)\s*(.+)")] + private static partial Regex DatePattern(); + [GeneratedRegex(@"^\#\#+\s*(.*)$")] + private static partial Regex SectionHeaderPattern(); + [GeneratedRegex(@"^\s*[-*]\s*\[([xX ])\]\s*(.*)$")] + private static partial Regex CheckboxPattern(); + [GeneratedRegex(@"^(!\w+)\s*((?:@\S+\s*)?)(?:\s*((?:#\S+\s*)*))?\s*$")] + private static partial Regex FragmentHeaderPattern(); + [GeneratedRegex(@"^!\w+\s*")] + private static partial Regex FragmentBoundaryPattern(); + + public static JournalEntry ParseJournalContent(string content, string fileStem) + { + ArgumentNullException.ThrowIfNull(content); + return new JournalEntry( + date: ExtractDate(content, fileStem), + rawContent: content, + sections: ParseSections(content), + fragments: ParseFragments(content)); + } + + public static string ExtractDate(string content, string fileStem) + { + ArgumentNullException.ThrowIfNull(content); + if (string.IsNullOrWhiteSpace(fileStem)) + throw new ArgumentException("File stem is required", nameof(fileStem)); + + var match = DatePattern().Match(content); + if (match.Success) + { + var parsed = match.Groups[1].Value.Trim(); + if (!string.IsNullOrWhiteSpace(parsed)) + return parsed; + } + + return fileStem.Trim(); + } + + public static Dictionary ParseSections(string content) + { + ArgumentNullException.ThrowIfNull(content); + + var parsedSections = new Dictionary(); + string? currentSectionTitle = null; + var currentSectionContent = new List(); + var currentSectionCheckboxes = new Dictionary(); + + var lines = content.Split(["\r\n", "\n", "\r"], StringSplitOptions.None); + foreach (var line in lines) + { + var sectionHeaderMatch = SectionHeaderPattern().Match(line.Trim()); + if (sectionHeaderMatch.Success) + { + if (currentSectionTitle is not null) + { + parsedSections[currentSectionTitle] = new ParsedSection( + currentSectionTitle, + currentSectionContent, + currentSectionCheckboxes); + } + + var headerText = sectionHeaderMatch.Groups[1].Value.Trim(); + var foundTitle = FindCanonicalSectionTitle(headerText); + + if (foundTitle is not null) + { + currentSectionTitle = foundTitle; + currentSectionContent = []; + currentSectionCheckboxes = []; + } + else + { + currentSectionTitle = null; + currentSectionContent = []; + currentSectionCheckboxes = []; + } + + continue; + } + + if (currentSectionTitle is not null) + { + var checkboxMatch = CheckboxPattern().Match(line); + if (checkboxMatch.Success) + { + var isChecked = checkboxMatch.Groups[1].Value.Trim().Equals("x", StringComparison.OrdinalIgnoreCase); + var checkboxText = checkboxMatch.Groups[2].Value.Trim(); + currentSectionCheckboxes[checkboxText] = isChecked; + } + + currentSectionContent.Add(line); + } + } + + if (currentSectionTitle is not null) + { + parsedSections[currentSectionTitle] = new ParsedSection( + currentSectionTitle, + currentSectionContent, + currentSectionCheckboxes); + } + + return parsedSections; + } + + public static List ParseFragments(string content) + { + ArgumentNullException.ThrowIfNull(content); + + var fragments = new List(); + var lines = content.Split(["\r\n", "\n", "\r"], StringSplitOptions.None); + + for (var i = 0; i < lines.Length; i++) + { + var headerMatch = FragmentHeaderPattern().Match(lines[i]); + if (!headerMatch.Success) + continue; + + var type = headerMatch.Groups[1].Value.Trim(); + var timeToken = headerMatch.Groups[2].Value.Trim().TrimStart('@'); + var tagsToken = headerMatch.Groups[3].Value.Trim(); + + var descriptionLines = new List(); + var j = i + 1; + while (j < lines.Length && !FragmentBoundaryPattern().IsMatch(lines[j])) + { + descriptionLines.Add(lines[j]); + j++; + } + + var description = string.Join("\n", descriptionLines).Trim(); + if (!string.IsNullOrWhiteSpace(description)) + { + var fragment = new Fragment(type, description); + if (!string.IsNullOrWhiteSpace(timeToken) && DateTimeOffset.TryParse(timeToken, out var parsedTime)) + fragment.Time = parsedTime; + + if (!string.IsNullOrWhiteSpace(tagsToken)) + { + fragment.Tags = + [ + .. tagsToken.Split(' ', StringSplitOptions.RemoveEmptyEntries) + .Where(t => t.StartsWith('#')) + .Select(t => t.Trim().TrimStart('#')) + .Where(t => !string.IsNullOrWhiteSpace(t)) + ]; + } + + fragments.Add(fragment); + } + + i = j - 1; + } + + return fragments; + } + + private static string? FindCanonicalSectionTitle(string headerText) + { + foreach (var title in SectionTitles.Canonical) + { + if (headerText.Contains(title, StringComparison.OrdinalIgnoreCase)) + return title; + } + + return null; + } +} diff --git a/Journal.Core/Services/Fragments/FragmentService.cs b/Journal.Core/Services/Fragments/FragmentService.cs new file mode 100644 index 0000000..55917fa --- /dev/null +++ b/Journal.Core/Services/Fragments/FragmentService.cs @@ -0,0 +1,81 @@ +using System.ComponentModel.DataAnnotations; +using Journal.Core.Dtos; +using Journal.Core.Models; +using Journal.Core.Repositories; + +namespace Journal.Core.Services.Fragments; + +public class FragmentService(IFragmentRepository repo) : IFragmentService +{ + private readonly IFragmentRepository _repo = repo ?? throw new ArgumentNullException(nameof(repo)); + + private static FragmentDto Map(Fragment f) => new( + f.Id, + f.Type, + f.Description, + f.Time, + f.Tags != null ? [.. f.Tags] : [] + ); + + public FragmentDto Create(CreateFragmentDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + + var ctx = new ValidationContext(dto); + Validator.ValidateObject(dto, ctx, validateAllProperties: true); + + var f = new Fragment(dto.Type, dto.Description); + if (dto.Tags != null) + f.Tags = [.. dto.Tags.Where(t => !string.IsNullOrWhiteSpace(t)).Select(t => t!.Trim())]; + + _repo.Add(f); + return Map(f); + } + + public bool Update(Guid id, UpdateFragmentDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + if (dto.Type != null && string.IsNullOrWhiteSpace(dto.Type)) + throw new ValidationException("Type cannot be empty"); + if (dto.Description != null && string.IsNullOrWhiteSpace(dto.Description)) + throw new ValidationException("Description cannot be empty"); + + var type = dto.Type?.Trim(); + var description = dto.Description?.Trim(); + var tags = dto.Tags?.Where(t => !string.IsNullOrWhiteSpace(t)).Select(t => t!.Trim()).ToList(); + + return _repo.Update(id, type, description, tags, dto.Time); + } + + public bool Remove(Guid id) => _repo.Remove(id); + + public List Search(string? type = null, string? tag = null, DateTimeOffset? timeAfter = null) + { + var items = _repo.Search(type, tag, timeAfter); + return [.. items.Select(Map)]; + } + + public List GetByTag(string tag) + { + var items = _repo.GetByTag(tag); + return [.. items.Select(Map)]; + } + + public List GetByType(string type) + { + var items = _repo.GetByType(type); + return [.. items.Select(Map)]; + } + + public List GetAll() + { + var items = _repo.GetAll(); + return [.. items.Select(Map)]; + } + + public FragmentDto? GetById(Guid id) + { + var f = _repo.GetById(id); + return f is null ? null : Map(f); + } +} diff --git a/Journal.Core/Services/Fragments/IFragmentService.cs b/Journal.Core/Services/Fragments/IFragmentService.cs new file mode 100644 index 0000000..6087081 --- /dev/null +++ b/Journal.Core/Services/Fragments/IFragmentService.cs @@ -0,0 +1,15 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Fragments; + +public interface IFragmentService +{ + FragmentDto Create(CreateFragmentDto dto); + bool Update(Guid id, UpdateFragmentDto dto); + bool Remove(Guid id); + List Search(string? type = null, string? tag = null, DateTimeOffset? timeAfter = null); + List GetByTag(string tag); + List GetByType(string type); + List GetAll(); + FragmentDto? GetById(Guid id); +} diff --git a/Journal.Core/Services/Lists/IListService.cs b/Journal.Core/Services/Lists/IListService.cs new file mode 100644 index 0000000..b727bb9 --- /dev/null +++ b/Journal.Core/Services/Lists/IListService.cs @@ -0,0 +1,12 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Lists; + +public interface IListService +{ + List GetAll(); + ListDocumentDto? GetById(Guid id); + ListDocumentDto Create(CreateListDto dto); + bool Update(Guid id, UpdateListDto dto); + bool Remove(Guid id); +} diff --git a/Journal.Core/Services/Lists/ListService.cs b/Journal.Core/Services/Lists/ListService.cs new file mode 100644 index 0000000..8b425a7 --- /dev/null +++ b/Journal.Core/Services/Lists/ListService.cs @@ -0,0 +1,54 @@ +using System.ComponentModel.DataAnnotations; +using Journal.Core.Dtos; +using Journal.Core.Models; +using Journal.Core.Repositories; + +namespace Journal.Core.Services.Lists; + +public class ListService(IListRepository repo) : IListService +{ + private readonly IListRepository _repo = repo ?? throw new ArgumentNullException(nameof(repo)); + + private static ListDocumentDto Map(ListDocument d) => new( + d.Id, + d.Label, + d.Content, + d.CreatedAt, + d.UpdatedAt + ); + + public List GetAll() + { + var items = _repo.GetAll(); + return [.. items.Select(Map)]; + } + + public ListDocumentDto? GetById(Guid id) + { + var d = _repo.GetById(id); + return d is null ? null : Map(d); + } + + public ListDocumentDto Create(CreateListDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + + var ctx = new ValidationContext(dto); + Validator.ValidateObject(dto, ctx, validateAllProperties: true); + + var doc = new ListDocument(dto.Label, dto.Content ?? ""); + _repo.Add(doc); + return Map(doc); + } + + public bool Update(Guid id, UpdateListDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + if (dto.Label is not null && string.IsNullOrWhiteSpace(dto.Label)) + throw new ValidationException("Label cannot be empty"); + + return _repo.Update(id, dto.Label?.Trim(), dto.Content); + } + + public bool Remove(Guid id) => _repo.Remove(id); +} diff --git a/Journal.Core/Services/Logging/CommandLogger.cs b/Journal.Core/Services/Logging/CommandLogger.cs new file mode 100644 index 0000000..018dd5f --- /dev/null +++ b/Journal.Core/Services/Logging/CommandLogger.cs @@ -0,0 +1,73 @@ +using System.Globalization; +using System.Text.Json; + +namespace Journal.Core.Services.Logging; + +public sealed class CommandLogger +{ + public static void LogStart(string action, string correlationId, JsonElement? payload) + { + var redactedPayload = LogRedactor.RedactPayload(payload); + EmitLog("information", action, correlationId, "start", redactedPayload); + } + + public static void LogSuccess(string action, string correlationId) => EmitLog("information", action, correlationId, "success"); + + public static void LogFailure(string action, string correlationId, string errorType, string? message = null) + { + var details = string.IsNullOrWhiteSpace(message) + ? "" + : (message!.Length <= 160 ? message : $"{message[..160]}...(truncated)"); + EmitLog("warning", action, correlationId, "failure", errorType: errorType, details: details); + } + + private static void EmitLog( + string level, + string action, + string correlationId, + string outcome, + object? payload = null, + string? errorType = null, + string? details = null) + { + if (!ShouldLog(level)) + return; + + var envelope = new + { + timestamp = DateTime.UtcNow.ToString("O", CultureInfo.InvariantCulture), + level, + component = "Entry", + action, + correlation_id = correlationId, + outcome, + error_type = errorType, + details, + payload + }; + Console.Error.WriteLine(JsonSerializer.Serialize(envelope)); + } + + private static bool ShouldLog(string level) + { + var configured = (Environment.GetEnvironmentVariable("JOURNAL_LOG_LEVEL") ?? "warning") + .Trim() + .ToLowerInvariant(); + var configuredRank = LogLevelRank(configured); + var incomingRank = LogLevelRank(level); + return incomingRank >= configuredRank; + } + + private static int LogLevelRank(string level) => level switch + { + "trace" => 0, + "debug" => 1, + "information" => 2, + "info" => 2, + "warning" => 3, + "warn" => 3, + "error" => 4, + "critical" => 5, + _ => 3 + }; +} diff --git a/Journal.Core/Services/Logging/LogRedactor.cs b/Journal.Core/Services/Logging/LogRedactor.cs new file mode 100644 index 0000000..b116bb5 --- /dev/null +++ b/Journal.Core/Services/Logging/LogRedactor.cs @@ -0,0 +1,73 @@ +using System.Text.Json; + +namespace Journal.Core.Services.Logging; + +public static class LogRedactor +{ + private static readonly HashSet SensitiveKeys = new(StringComparer.OrdinalIgnoreCase) + { + "password", + "passphrase", + "secret", + "token", + "apiKey", + "api_key", + "cloudAiApiKey", + "content", + "rawContent", + "prompt", + "audioBase64", + "audio_base64", + "text" + }; + + public static object? RedactPayload(JsonElement? payload) + { + if (payload is null) + return null; + return RedactElement(payload.Value, parentKey: null); + } + + private static object? RedactElement(JsonElement element, string? parentKey) + { + if (parentKey is not null && SensitiveKeys.Contains(parentKey)) + return "[REDACTED]"; + + return element.ValueKind switch + { + JsonValueKind.Object => RedactObject(element), + JsonValueKind.Array => RedactArray(element), + JsonValueKind.String => RedactString(element.GetString() ?? "", parentKey), + JsonValueKind.Number => element.GetRawText(), + JsonValueKind.True => true, + JsonValueKind.False => false, + JsonValueKind.Null => null, + _ => element.GetRawText() + }; + } + + private static Dictionary RedactObject(JsonElement element) + { + var output = new Dictionary(StringComparer.OrdinalIgnoreCase); + foreach (var property in element.EnumerateObject()) + output[property.Name] = RedactElement(property.Value, property.Name); + return output; + } + + private static List RedactArray(JsonElement element) + { + var output = new List(); + foreach (var item in element.EnumerateArray()) + output.Add(RedactElement(item, parentKey: null)); + return output; + } + + private static object RedactString(string value, string? key) + { + if (key is not null && SensitiveKeys.Contains(key)) + return "[REDACTED]"; + if (value.Length <= 128) + return value; + return $"{value[..128]}...(truncated)"; + } +} diff --git a/Journal.Core/Services/Sidecar/PythonSidecarClient.cs b/Journal.Core/Services/Sidecar/PythonSidecarClient.cs new file mode 100644 index 0000000..01284bd --- /dev/null +++ b/Journal.Core/Services/Sidecar/PythonSidecarClient.cs @@ -0,0 +1,114 @@ +using System.Diagnostics; +using System.Text.Json; +using Journal.Core.Models; + +namespace Journal.Core.Services.Sidecar; + +public sealed class PythonSidecarClient(JournalConfig config) +{ + private static readonly JsonSerializerOptions JsonOptions = new() + { + PropertyNameCaseInsensitive = true + }; + + private readonly JournalConfig _config = config; + + public async Task SendAsync(string action, object payload, CancellationToken cancellationToken) + { + var request = JsonSerializer.Serialize(new { action, payload }, JsonOptions); + + using var process = new Process(); + process.StartInfo = new ProcessStartInfo + { + FileName = _config.PythonExecutable, + UseShellExecute = false, + RedirectStandardInput = true, + RedirectStandardOutput = true, + RedirectStandardError = true, + CreateNoWindow = true, + WorkingDirectory = _config.ProjectRoot + }; + process.StartInfo.ArgumentList.Add(_config.PythonAiSidecarPath); + + if (!process.Start()) + throw new InvalidOperationException("Failed to start Python sidecar process."); + + await process.StandardInput.WriteLineAsync(request); + process.StandardInput.Close(); + + using var timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + timeoutCts.CancelAfter(_config.AiSidecarTimeoutMs); + + try + { + await process.WaitForExitAsync(timeoutCts.Token); + } + catch (OperationCanceledException) + { + TryKill(process); + throw new TimeoutException($"Python sidecar timed out after {_config.AiSidecarTimeoutMs} ms."); + } + + var stdout = await process.StandardOutput.ReadToEndAsync(); + var stderr = await process.StandardError.ReadToEndAsync(); + var line = LastJsonLine(stdout); + if (string.IsNullOrWhiteSpace(line)) + throw new InvalidOperationException($"Python sidecar returned no JSON response. stderr: {stderr}".Trim()); + + JsonDocument doc; + try + { + doc = JsonDocument.Parse(line); + } + catch (JsonException ex) + { + throw new InvalidOperationException($"Invalid JSON from Python sidecar: {line}", ex); + } + + using (doc) + { + var root = doc.RootElement; + if (!root.TryGetProperty("ok", out var okNode) || okNode.ValueKind != JsonValueKind.True && okNode.ValueKind != JsonValueKind.False) + throw new InvalidOperationException("Python sidecar response missing boolean 'ok' field."); + + if (!okNode.GetBoolean()) + { + var error = root.TryGetProperty("error", out var errorNode) + ? errorNode.GetString() ?? "Unknown sidecar error." + : "Unknown sidecar error."; + throw new InvalidOperationException(error); + } + + if (!root.TryGetProperty("data", out var dataNode)) + return null; + + return dataNode.Clone(); + } + } + + private static string LastJsonLine(string text) + { + var lines = text.Split(['\r', '\n'], StringSplitOptions.RemoveEmptyEntries); + for (var i = lines.Length - 1; i >= 0; i--) + { + var line = lines[i].Trim(); + if (line.StartsWith("{", StringComparison.Ordinal) && line.EndsWith("}", StringComparison.Ordinal)) + return line; + } + + return ""; + } + + private static void TryKill(Process process) + { + try + { + if (!process.HasExited) + process.Kill(entireProcessTree: true); + } + catch + { + // Ignore cleanup errors while handling timeout/failure path. + } + } +} diff --git a/Journal.Core/Services/Sidecar/SidecarCli.cs b/Journal.Core/Services/Sidecar/SidecarCli.cs new file mode 100644 index 0000000..f7d82fd --- /dev/null +++ b/Journal.Core/Services/Sidecar/SidecarCli.cs @@ -0,0 +1,385 @@ +using System.Text; +using Journal.Core.Dtos; +using Journal.Core.Services.Config; +using Journal.Core.Services.Entries; +using Journal.Core.Services.Vault; + +namespace Journal.Core.Services.Sidecar; + +public sealed class SidecarCli(IVaultStorageService vaultStorage, IEntrySearchService entrySearch, IJournalConfigService config) +{ + private readonly IVaultStorageService _vaultStorage = vaultStorage; + private readonly IEntrySearchService _entrySearch = entrySearch; + private readonly IJournalConfigService _config = config; + + public async Task RunAsync(string[] args, Entry entry) + { + ArgumentNullException.ThrowIfNull(args); + ArgumentNullException.ThrowIfNull(entry); + + if (args.Length == 0) + { + await entry.RunAsync(); + return 0; + } + + if (IsHelp(args[0])) + { + PrintUsage(); + return 0; + } + + if (string.Equals(args[0], "vault", StringComparison.OrdinalIgnoreCase)) + return RunVaultCommand([.. args.Skip(1)]); + if (string.Equals(args[0], "search", StringComparison.OrdinalIgnoreCase)) + return RunSearchCommand([.. args.Skip(1)]); + + Console.Error.WriteLine($"Unknown command: {args[0]}"); + PrintUsage(); + return 2; + } + + public int RunVaultCommand(string[] args) + { + ArgumentNullException.ThrowIfNull(args); + if (args.Length == 0 || IsHelp(args[0])) + { + PrintVaultUsage(); + return 2; + } + + var action = args[0].Trim().ToLowerInvariant(); + if (action is not ("load" or "save")) + { + Console.Error.WriteLine($"Unknown vault action: {args[0]}"); + PrintVaultUsage(); + return 2; + } + + if (!TryParseVaultOptions([.. args.Skip(1)], out var options, out var parseError)) + { + Console.Error.WriteLine(parseError); + PrintVaultUsage(); + return 2; + } + + var password = options.Password; + if (string.IsNullOrWhiteSpace(password)) + password = PromptPassword(); + + if (string.IsNullOrWhiteSpace(password)) + { + Console.Error.WriteLine("Vault password cannot be empty."); + return 2; + } + + var (vaultDirectory, dataDirectory) = ResolveDirectories(options.VaultDirectory, options.DataDirectory); + + try + { + if (action == "load") + { + var ok = _vaultStorage.LoadAllVaults(password, vaultDirectory, dataDirectory); + if (!ok) + { + Console.Error.WriteLine("Incorrect password."); + return 1; + } + + Console.WriteLine($"Vault loaded. Decrypted files are in {dataDirectory}"); + return 0; + } + + _vaultStorage.RebuildAllVaults(password, vaultDirectory, dataDirectory); + Console.WriteLine($"Vault saved from decrypted files in {dataDirectory}"); + return 0; + } + catch (Exception ex) + { + Console.Error.WriteLine($"Vault command failed: {ex.Message}"); + return 1; + } + } + + public int RunSearchCommand(string[] args) + { + ArgumentNullException.ThrowIfNull(args); + if (args.Length > 0 && IsHelp(args[0])) + { + PrintSearchUsage(); + return 0; + } + + if (!TryParseSearchOptions(args, out var options, out var parseError)) + { + Console.Error.WriteLine(parseError); + PrintSearchUsage(); + return 2; + } + + var (_, dataDirectory) = ResolveDirectories(vaultOverride: null, options.DataDirectory); + var entryCount = Directory.Exists(dataDirectory) + ? Directory.GetFiles(dataDirectory, "*.md") + .Count(path => !EntryFileNaming.IsTemplateFileName(Path.GetFileName(path))) + : 0; + if (entryCount == 0) + { + Console.WriteLine("No decrypted journal entries found. Please load the vault first: journal vault load"); + return 0; + } + + try + { + var request = new EntrySearchRequestDto( + DataDirectory: dataDirectory, + Query: options.Query, + Section: options.Section, + StartDate: options.StartDate, + EndDate: options.EndDate, + Tags: options.Tags, + Types: options.Types, + Checked: options.Checked, + Unchecked: options.Unchecked); + + var results = _entrySearch.SearchEntriesAsync(request).GetAwaiter().GetResult(); + if (results.Count == 0) + { + Console.WriteLine("No entries found matching the criteria."); + return 0; + } + + foreach (var result in results) + { + Console.WriteLine($"--- {result.Entry.Date} ---"); + Console.WriteLine(result.Entry.RawContent); + Console.WriteLine(); + } + + return 0; + } + catch (Exception ex) + { + Console.Error.WriteLine($"Search command failed: {ex.Message}"); + return 1; + } + } + + private static bool TryParseVaultOptions(string[] args, out VaultOptions options, out string error) + { + var parsed = new VaultOptions(); + for (var i = 0; i < args.Length; i++) + { + var token = args[i]; + if (IsHelp(token)) + { + options = parsed; + error = ""; + return false; + } + + if (i + 1 >= args.Length) + { + options = parsed; + error = $"Missing value for option '{token}'."; + return false; + } + + var value = args[i + 1]; + switch (token) + { + case "--password": + case "-p": + parsed.Password = value; + break; + case "--vault-dir": + parsed.VaultDirectory = value; + break; + case "--data-dir": + parsed.DataDirectory = value; + break; + default: + options = parsed; + error = $"Unknown option '{token}'."; + return false; + } + + i++; + } + + options = parsed; + error = ""; + return true; + } + + private static bool TryParseSearchOptions(string[] args, out SearchOptions options, out string error) + { + var parsed = new SearchOptions(); + for (var i = 0; i < args.Length; i++) + { + var token = args[i]; + if (IsHelp(token)) + { + options = parsed; + error = ""; + return false; + } + + if (!token.StartsWith("-", StringComparison.Ordinal)) + { + if (parsed.Query is null) + { + parsed.Query = token; + continue; + } + + options = parsed; + error = $"Unexpected positional argument '{token}'."; + return false; + } + + if (i + 1 >= args.Length) + { + options = parsed; + error = $"Missing value for option '{token}'."; + return false; + } + + var value = args[i + 1]; + switch (token) + { + case "--data-dir": + parsed.DataDirectory = value; + break; + case "--tag": + case "-t": + parsed.Tags.Add(value); + break; + case "--type": + case "-y": + parsed.Types.Add(value); + break; + case "--start-date": + case "-s": + parsed.StartDate = value; + break; + case "--end-date": + case "-e": + parsed.EndDate = value; + break; + case "--section": + case "-sec": + parsed.Section = value; + break; + case "--checked": + case "-chk": + parsed.Checked.Add(value); + break; + case "--unchecked": + case "-uchk": + parsed.Unchecked.Add(value); + break; + default: + options = parsed; + error = $"Unknown option '{token}'."; + return false; + } + + i++; + } + + options = parsed; + error = ""; + return true; + } + + private (string VaultDirectory, string DataDirectory) ResolveDirectories(string? vaultOverride, string? dataOverride) + { + var envVault = Environment.GetEnvironmentVariable("JOURNAL_VAULT_DIR"); + var envData = Environment.GetEnvironmentVariable("JOURNAL_DATA_DIR"); + var defaults = _config.Current; + + var vault = FirstNonEmpty(vaultOverride, envVault) ?? defaults.VaultDirectory; + var data = FirstNonEmpty(dataOverride, envData) ?? defaults.DataDirectory; + return (Path.GetFullPath(vault), Path.GetFullPath(data)); + } + + private static string? FirstNonEmpty(params string?[] values) => + values.FirstOrDefault(value => !string.IsNullOrWhiteSpace(value)); + + private static string PromptPassword() + { + if (Console.IsInputRedirected) + return Console.ReadLine() ?? ""; + + Console.Write("Vault password: "); + var builder = new StringBuilder(); + while (true) + { + var keyInfo = Console.ReadKey(intercept: true); + if (keyInfo.Key == ConsoleKey.Enter) + { + Console.WriteLine(); + break; + } + + if (keyInfo.Key == ConsoleKey.Backspace) + { + if (builder.Length > 0) + builder.Length--; + continue; + } + + if (!char.IsControl(keyInfo.KeyChar)) + builder.Append(keyInfo.KeyChar); + } + + return builder.ToString(); + } + + private static bool IsHelp(string token) => + string.Equals(token, "--help", StringComparison.OrdinalIgnoreCase) || + string.Equals(token, "-h", StringComparison.OrdinalIgnoreCase) || + string.Equals(token, "help", StringComparison.OrdinalIgnoreCase); + + private static void PrintUsage() + { + Console.WriteLine("Usage:"); + Console.WriteLine(" Journal.Sidecar # sidecar stdin/stdout mode"); + Console.WriteLine(" Journal.Sidecar vault load [--password ] [--vault-dir ] [--data-dir ]"); + Console.WriteLine(" Journal.Sidecar vault save [--password ] [--vault-dir ] [--data-dir ]"); + Console.WriteLine(" Journal.Sidecar search [query] [--tag ] [--type ] [--start-date ] [--end-date ] [--section ] [--checked <text>] [--unchecked <text>] [--data-dir <path>]"); + } + + private static void PrintVaultUsage() + { + Console.WriteLine("Vault usage:"); + Console.WriteLine(" Journal.Sidecar vault load [--password <value>] [--vault-dir <path>] [--data-dir <path>]"); + Console.WriteLine(" Journal.Sidecar vault save [--password <value>] [--vault-dir <path>] [--data-dir <path>]"); + } + + private static void PrintSearchUsage() + { + Console.WriteLine("Search usage:"); + Console.WriteLine(" Journal.Sidecar search [query] [--tag <value>] [--type <value>] [--start-date <yyyy-MM-dd>] [--end-date <yyyy-MM-dd>] [--section <title>] [--checked <text>] [--unchecked <text>] [--data-dir <path>]"); + } + + private sealed class VaultOptions + { + public string? Password { get; set; } + public string? VaultDirectory { get; set; } + public string? DataDirectory { get; set; } + } + + private sealed class SearchOptions + { + public string? Query { get; set; } + public string? DataDirectory { get; set; } + public string? StartDate { get; set; } + public string? EndDate { get; set; } + public string? Section { get; set; } + public List<string> Tags { get; } = []; + public List<string> Types { get; } = []; + public List<string> Checked { get; } = []; + public List<string> Unchecked { get; } = []; + } +} diff --git a/Journal.Core/Services/Speech/DisabledSpeechBridgeService.cs b/Journal.Core/Services/Speech/DisabledSpeechBridgeService.cs new file mode 100644 index 0000000..027ddc1 --- /dev/null +++ b/Journal.Core/Services/Speech/DisabledSpeechBridgeService.cs @@ -0,0 +1,26 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Speech; + +public sealed class DisabledSpeechBridgeService(string provider = "none", string message = "Speech bridge is disabled.") : ISpeechBridgeService +{ + private readonly string _provider = string.IsNullOrWhiteSpace(provider) ? "none" : provider.Trim(); + private readonly string _message = string.IsNullOrWhiteSpace(message) ? "Speech bridge is disabled." : message.Trim(); + + public Task<SpeechDevicesResultDto> ListDevicesAsync(CancellationToken cancellationToken = default) + { + var warning = $"{_message} (provider={_provider})"; + return Task.FromResult(new SpeechDevicesResultDto([], warning)); + } + + public Task<SpeechTranscribeResultDto> TranscribeAsync( + SpeechTranscribeRequestDto request, + CancellationToken cancellationToken = default) + { + if (request is null) + throw new ArgumentNullException(nameof(request)); + var engine = string.IsNullOrWhiteSpace(request.Engine) ? "none" : request.Engine.Trim(); + var warning = $"{_message} (provider={_provider})"; + return Task.FromResult(new SpeechTranscribeResultDto("", engine, warning)); + } +} diff --git a/Journal.Core/Services/Speech/ISpeechBridgeService.cs b/Journal.Core/Services/Speech/ISpeechBridgeService.cs new file mode 100644 index 0000000..574ba78 --- /dev/null +++ b/Journal.Core/Services/Speech/ISpeechBridgeService.cs @@ -0,0 +1,9 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Speech; + +public interface ISpeechBridgeService +{ + Task<SpeechDevicesResultDto> ListDevicesAsync(CancellationToken cancellationToken = default); + Task<SpeechTranscribeResultDto> TranscribeAsync(SpeechTranscribeRequestDto request, CancellationToken cancellationToken = default); +} diff --git a/Journal.Core/Services/Speech/PythonSidecarSpeechService.cs b/Journal.Core/Services/Speech/PythonSidecarSpeechService.cs new file mode 100644 index 0000000..7936f0d --- /dev/null +++ b/Journal.Core/Services/Speech/PythonSidecarSpeechService.cs @@ -0,0 +1,81 @@ +using System.Text.Json; +using Journal.Core.Dtos; +using Journal.Core.Models; +using Journal.Core.Services.Sidecar; + +namespace Journal.Core.Services.Speech; + +public sealed class PythonSidecarSpeechService : ISpeechBridgeService +{ + private readonly PythonSidecarClient _client; + + public PythonSidecarSpeechService(JournalConfig config) + { + if (string.IsNullOrWhiteSpace(config.PythonAiSidecarPath)) + throw new ArgumentException("Python sidecar path is required."); + if (!File.Exists(config.PythonAiSidecarPath)) + throw new FileNotFoundException($"Python sidecar not found: {config.PythonAiSidecarPath}"); + _client = new PythonSidecarClient(config); + } + + public async Task<SpeechDevicesResultDto> ListDevicesAsync(CancellationToken cancellationToken = default) + { + var data = await _client.SendAsync("speech.devices.list", new { }, cancellationToken); + if (data is null || data.Value.ValueKind != JsonValueKind.Object) + return new SpeechDevicesResultDto([], "Unexpected speech device response from Python sidecar."); + + var warning = data.Value.TryGetProperty("warning", out var warningNode) + ? warningNode.GetString() + : null; + + var devices = new List<SpeechDeviceDto>(); + if (data.Value.TryGetProperty("devices", out var devicesNode) && devicesNode.ValueKind == JsonValueKind.Array) + { + foreach (var device in devicesNode.EnumerateArray()) + { + if (device.ValueKind != JsonValueKind.Object) + continue; + + var index = device.TryGetProperty("index", out var indexNode) && indexNode.ValueKind == JsonValueKind.Number + ? indexNode.GetInt32() + : -1; + var name = device.TryGetProperty("name", out var nameNode) + ? nameNode.GetString() ?? "" + : ""; + devices.Add(new SpeechDeviceDto(index, name)); + } + } + + return new SpeechDevicesResultDto(devices, warning); + } + + public async Task<SpeechTranscribeResultDto> TranscribeAsync( + SpeechTranscribeRequestDto request, + CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(request); + + var data = await _client.SendAsync("speech.transcribe", new + { + audio_base64 = request.AudioBase64, + engine = request.Engine, + whisper_model = request.WhisperModel, + text = request.Text, + simulate_delay_ms = request.SimulateDelayMs + }, cancellationToken); + + if (data is null || data.Value.ValueKind != JsonValueKind.Object) + throw new InvalidOperationException("Python sidecar speech response must be a JSON object."); + + var text = data.Value.TryGetProperty("text", out var textNode) + ? textNode.GetString() ?? "" + : ""; + var engine = data.Value.TryGetProperty("engine", out var engineNode) + ? engineNode.GetString() ?? (request.Engine ?? "whisper") + : (request.Engine ?? "whisper"); + var warning = data.Value.TryGetProperty("warning", out var warningNode) + ? warningNode.GetString() + : null; + return new SpeechTranscribeResultDto(text, engine, warning); + } +} diff --git a/Journal.Core/Services/Todos/ITodoService.cs b/Journal.Core/Services/Todos/ITodoService.cs new file mode 100644 index 0000000..9b14e8b --- /dev/null +++ b/Journal.Core/Services/Todos/ITodoService.cs @@ -0,0 +1,16 @@ +using Journal.Core.Dtos; + +namespace Journal.Core.Services.Todos; + +public interface ITodoService +{ + List<TodoListDto> GetAllLists(); + TodoListDto? GetListById(Guid id); + TodoListDto CreateList(CreateTodoListDto dto); + bool UpdateList(Guid id, UpdateTodoListDto dto); + bool RemoveList(Guid id); + + TodoItemDto CreateItem(CreateTodoItemDto dto); + bool UpdateItem(Guid id, UpdateTodoItemDto dto); + bool RemoveItem(Guid id); +} diff --git a/Journal.Core/Services/Todos/TodoService.cs b/Journal.Core/Services/Todos/TodoService.cs new file mode 100644 index 0000000..9d1f587 --- /dev/null +++ b/Journal.Core/Services/Todos/TodoService.cs @@ -0,0 +1,91 @@ +using System.ComponentModel.DataAnnotations; +using Journal.Core.Dtos; +using Journal.Core.Models; +using Journal.Core.Repositories; + +namespace Journal.Core.Services.Todos; + +public class TodoService(ITodoRepository repo) : ITodoService +{ + private readonly ITodoRepository _repo = repo ?? throw new ArgumentNullException(nameof(repo)); + + private static TodoItemDto MapItem(TodoItem i) => new( + i.Id, + i.ListId, + i.Text, + i.Done, + i.SortOrder + ); + + private TodoListDto MapList(TodoList l) + { + var items = _repo.GetItemsByListId(l.Id); + return new TodoListDto( + l.Id, + l.Label, + l.CreatedAt, + [.. items.Select(MapItem)] + ); + } + + public List<TodoListDto> GetAllLists() + { + var lists = _repo.GetAllLists(); + return [.. lists.Select(MapList)]; + } + + public TodoListDto? GetListById(Guid id) + { + var l = _repo.GetListById(id); + return l is null ? null : MapList(l); + } + + public TodoListDto CreateList(CreateTodoListDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + + var ctx = new ValidationContext(dto); + Validator.ValidateObject(dto, ctx, validateAllProperties: true); + + var list = new TodoList(dto.Label); + _repo.AddList(list); + return new TodoListDto(list.Id, list.Label, list.CreatedAt, []); + } + + public bool UpdateList(Guid id, UpdateTodoListDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + if (dto.Label is not null && string.IsNullOrWhiteSpace(dto.Label)) + throw new ValidationException("Label cannot be empty"); + + return _repo.UpdateList(id, dto.Label?.Trim()); + } + + public bool RemoveList(Guid id) => _repo.RemoveList(id); + + public TodoItemDto CreateItem(CreateTodoItemDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + + var ctx = new ValidationContext(dto); + Validator.ValidateObject(dto, ctx, validateAllProperties: true); + + if (dto.ListId == Guid.Empty) + throw new ValidationException("ListId is required"); + + var item = new TodoItem(dto.ListId, dto.Text, dto.SortOrder ?? 0); + _repo.AddItem(item); + return MapItem(item); + } + + public bool UpdateItem(Guid id, UpdateTodoItemDto dto) + { + ArgumentNullException.ThrowIfNull(dto); + if (dto.Text is not null && string.IsNullOrWhiteSpace(dto.Text)) + throw new ValidationException("Text cannot be empty"); + + return _repo.UpdateItem(id, dto.Text?.Trim(), dto.Done, dto.SortOrder); + } + + public bool RemoveItem(Guid id) => _repo.RemoveItem(id); +} diff --git a/Journal.Core/Services/Vault/IVaultCryptoService.cs b/Journal.Core/Services/Vault/IVaultCryptoService.cs new file mode 100644 index 0000000..af9e388 --- /dev/null +++ b/Journal.Core/Services/Vault/IVaultCryptoService.cs @@ -0,0 +1,8 @@ +namespace Journal.Core.Services.Vault; + +public interface IVaultCryptoService +{ + byte[] DeriveKey(string password, byte[] salt); + byte[] EncryptData(byte[] data, string password); + byte[] DecryptData(byte[] encryptedData, string password); +} diff --git a/Journal.Core/Services/Vault/IVaultStorageService.cs b/Journal.Core/Services/Vault/IVaultStorageService.cs new file mode 100644 index 0000000..3a76b20 --- /dev/null +++ b/Journal.Core/Services/Vault/IVaultStorageService.cs @@ -0,0 +1,10 @@ +namespace Journal.Core.Services.Vault; + +public interface IVaultStorageService +{ + string GetMonthlyVaultFileName(DateTime date); + bool LoadAllVaults(string password, string vaultDirectory, string dataDirectory); + bool SaveCurrentMonthVault(string password, string vaultDirectory, string dataDirectory, DateTime now); + void RebuildAllVaults(string password, string vaultDirectory, string dataDirectory); + void ClearDataDirectory(string dataDirectory); +} diff --git a/Journal.Core/Services/Vault/VaultCryptoService.cs b/Journal.Core/Services/Vault/VaultCryptoService.cs new file mode 100644 index 0000000..8ef4e96 --- /dev/null +++ b/Journal.Core/Services/Vault/VaultCryptoService.cs @@ -0,0 +1,83 @@ +using System.Security.Cryptography; +using System.Text; + +namespace Journal.Core.Services.Vault; + +public class VaultCryptoService : IVaultCryptoService +{ + public const int SaltSize = 16; + public const int KeySize = 32; + public const int NonceSize = 12; + public const int TagSize = 16; + public const int Iterations = 600_000; + + public byte[] DeriveKey(string password, byte[] salt) + { + if (string.IsNullOrWhiteSpace(password)) + throw new ArgumentException("Password cannot be empty.", nameof(password)); + ArgumentNullException.ThrowIfNull(salt); + if (salt.Length != SaltSize) + throw new ArgumentException($"Salt must be {SaltSize} bytes.", nameof(salt)); + + return Rfc2898DeriveBytes.Pbkdf2( + Encoding.UTF8.GetBytes(password), + salt, + Iterations, + HashAlgorithmName.SHA256, + KeySize); + } + + public byte[] EncryptData(byte[] data, string password) + { + ArgumentNullException.ThrowIfNull(data); + + var salt = RandomNumberGenerator.GetBytes(SaltSize); + var nonce = RandomNumberGenerator.GetBytes(NonceSize); + return EncryptData(data, password, salt, nonce); + } + + public byte[] DecryptData(byte[] encryptedData, string password) + { + ArgumentNullException.ThrowIfNull(encryptedData); + + var minLength = SaltSize + NonceSize + TagSize; + if (encryptedData.Length < minLength) + throw new ArgumentException("Encrypted payload is too short.", nameof(encryptedData)); + + var salt = encryptedData.AsSpan(0, SaltSize).ToArray(); + var nonce = encryptedData.AsSpan(SaltSize, NonceSize).ToArray(); + var tag = encryptedData.AsSpan(SaltSize + NonceSize, TagSize).ToArray(); + var ciphertext = encryptedData.AsSpan(SaltSize + NonceSize + TagSize).ToArray(); + + var key = DeriveKey(password, salt); + var plaintext = new byte[ciphertext.Length]; + using var aes = new AesGcm(key, TagSize); + aes.Decrypt(nonce, ciphertext, tag, plaintext); + return plaintext; + } + + public byte[] EncryptData(byte[] data, string password, byte[] salt, byte[] nonce) + { + ArgumentNullException.ThrowIfNull(data); + ArgumentNullException.ThrowIfNull(salt); + ArgumentNullException.ThrowIfNull(nonce); + if (salt.Length != SaltSize) + throw new ArgumentException($"Salt must be {SaltSize} bytes.", nameof(salt)); + if (nonce.Length != NonceSize) + throw new ArgumentException($"Nonce must be {NonceSize} bytes.", nameof(nonce)); + + var key = DeriveKey(password, salt); + var ciphertext = new byte[data.Length]; + var tag = new byte[TagSize]; + + using var aes = new AesGcm(key, TagSize); + aes.Encrypt(nonce, data, ciphertext, tag); + + var payload = new byte[SaltSize + NonceSize + TagSize + ciphertext.Length]; + Buffer.BlockCopy(salt, 0, payload, 0, SaltSize); + Buffer.BlockCopy(nonce, 0, payload, SaltSize, NonceSize); + Buffer.BlockCopy(tag, 0, payload, SaltSize + NonceSize, TagSize); + Buffer.BlockCopy(ciphertext, 0, payload, SaltSize + NonceSize + TagSize, ciphertext.Length); + return payload; + } +} diff --git a/Journal.Core/Services/Vault/VaultStorageService.cs b/Journal.Core/Services/Vault/VaultStorageService.cs new file mode 100644 index 0000000..649663c --- /dev/null +++ b/Journal.Core/Services/Vault/VaultStorageService.cs @@ -0,0 +1,386 @@ +using System.Diagnostics; +using System.IO.Compression; +using System.Globalization; +using System.Security.Cryptography; +using System.Text; + +namespace Journal.Core.Services.Vault; + +public class VaultStorageService(IVaultCryptoService crypto) : IVaultStorageService +{ + private readonly IVaultCryptoService _crypto = crypto; + private readonly Dictionary<string, string> _monthFingerprintCache = new(StringComparer.Ordinal); + private readonly object _vaultIoLock = new(); + + public string GetMonthlyVaultFileName(DateTime date) => date.ToString("yyyy-MM") + ".vault"; + + public bool LoadAllVaults(string password, string vaultDirectory, string dataDirectory) + { + EnsureRequiredArguments(password, vaultDirectory, dataDirectory); + + lock (_vaultIoLock) + { + _monthFingerprintCache.Clear(); + PrepareDataDirectory(dataDirectory); + + if (!Directory.Exists(vaultDirectory)) + return true; + + var vaultFiles = Directory.GetFiles(vaultDirectory, "*.vault") + .OrderBy(Path.GetFileName, StringComparer.Ordinal) + .ToArray(); + if (vaultFiles.Length == 0) + return true; + + // Restore database vault files first + RestoreDatabaseVaults(password, vaultDirectory, dataDirectory); + + var anyDecrypted = false; + var anyVaultFiles = false; + foreach (var vaultFile in vaultFiles) + { + var fileName = Path.GetFileName(vaultFile); + if (string.Equals(fileName, "_init_vault.vault", StringComparison.OrdinalIgnoreCase)) + { + try + { + File.Delete(vaultFile); + } + catch (Exception ex) + { + Debug.WriteLine($"[VaultStorageService] Failed to delete legacy vault file {fileName}: {ex.Message}"); + } + continue; + } + + if (IsReservedVaultFile(fileName)) + continue; + + anyVaultFiles = true; + try + { + var encrypted = File.ReadAllBytes(vaultFile); + var decryptedZip = _crypto.DecryptData(encrypted, password); + ExtractZipContent(decryptedZip, dataDirectory); + anyDecrypted = true; + } + catch (CryptographicException) + { + Debug.WriteLine($"[VaultStorageService] Decryption failed for {fileName} (likely wrong password)"); + } + catch (Exception ex) + { + Debug.WriteLine($"[VaultStorageService] Failed to load vault {fileName}: {ex.GetType().Name} - {ex.Message}"); + } + } + + if (!anyDecrypted && anyVaultFiles) + return false; + + return true; + } + } + + public bool SaveCurrentMonthVault(string password, string vaultDirectory, string dataDirectory, DateTime now) + { + EnsureRequiredArguments(password, vaultDirectory, dataDirectory); + + lock (_vaultIoLock) + { + Directory.CreateDirectory(vaultDirectory); + if (!Directory.Exists(dataDirectory)) + return false; + + var monthKey = now.ToString("yyyy-MM", CultureInfo.InvariantCulture); + var filesInMonth = Directory.GetFiles(dataDirectory, "*.md") + .Where(path => Path.GetFileNameWithoutExtension(path).StartsWith(monthKey, StringComparison.Ordinal)) + .OrderBy(Path.GetFileName, StringComparer.Ordinal) + .ToList(); + + var savedMonth = false; + if (filesInMonth.Count > 0) + { + var currentFingerprint = ComputeMonthFingerprint(filesInMonth); + if (!_monthFingerprintCache.TryGetValue(monthKey, out var cachedFingerprint) || + !string.Equals(cachedFingerprint, currentFingerprint, StringComparison.Ordinal)) + { + SaveMonth(password, monthKey, filesInMonth, vaultDirectory); + savedMonth = true; + } + } + + // Also persist custom-named entries alongside the current month vault + SaveCustomEntries(password, vaultDirectory, dataDirectory); + + return savedMonth; + } + } + + public void RebuildAllVaults(string password, string vaultDirectory, string dataDirectory) + { + EnsureRequiredArguments(password, vaultDirectory, dataDirectory); + + lock (_vaultIoLock) + { + Directory.CreateDirectory(vaultDirectory); + if (!Directory.Exists(dataDirectory)) + return; + + var monthlyFiles = new Dictionary<string, List<string>>(StringComparer.Ordinal); + foreach (var filePath in Directory.GetFiles(dataDirectory, "*.md")) + { + var stem = Path.GetFileNameWithoutExtension(filePath); + if (!DateTime.TryParseExact(stem, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var fileDate)) + continue; + + var monthKey = fileDate.ToString("yyyy-MM", CultureInfo.InvariantCulture); + if (!monthlyFiles.TryGetValue(monthKey, out var files)) + { + files = []; + monthlyFiles[monthKey] = files; + } + + files.Add(filePath); + } + + foreach (var (monthKey, filesInMonth) in monthlyFiles.OrderBy(static pair => pair.Key, StringComparer.Ordinal)) + SaveMonth(password, monthKey, filesInMonth, vaultDirectory); + + SaveCustomEntries(password, vaultDirectory, dataDirectory); + SaveDatabaseVaults(password, vaultDirectory, dataDirectory); + } + } + + public void ClearDataDirectory(string dataDirectory) + { + if (string.IsNullOrWhiteSpace(dataDirectory)) + throw new ArgumentException("Data directory is required.", nameof(dataDirectory)); + + lock (_vaultIoLock) + { + PrepareDataDirectory(dataDirectory); + _monthFingerprintCache.Clear(); + } + } + + private static void PrepareDataDirectory(string dataDirectory) + { + DeleteDirectoryWithRetries(dataDirectory); + Directory.CreateDirectory(dataDirectory); + } + + private static void DeleteDirectoryWithRetries(string dataDirectory, int retries = 5, int delayMs = 200) + { + if (!Directory.Exists(dataDirectory)) + return; + + for (var attempt = 0; attempt < retries; attempt++) + { + try + { + Directory.Delete(dataDirectory, recursive: true); + return; + } + catch (IOException) when (attempt < retries - 1) + { + Thread.Sleep(delayMs); + } + catch (UnauthorizedAccessException) when (attempt < retries - 1) + { + Thread.Sleep(delayMs); + } + } + + Directory.Delete(dataDirectory, recursive: true); + } + + // ── Custom entries vault helpers ────────────────────────────── + + private const string CustomEntriesVaultFileName = "_custom_entries.vault"; + + private List<string> GetCustomEntryFiles(string dataDirectory) + { + return Directory.GetFiles(dataDirectory, "*.md") + .Where(path => + { + var stem = Path.GetFileNameWithoutExtension(path); + return !DateTime.TryParseExact(stem, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out _); + }) + .OrderBy(Path.GetFileName, StringComparer.Ordinal) + .ToList(); + } + + private void SaveCustomEntries(string password, string vaultDirectory, string dataDirectory) + { + var customFiles = GetCustomEntryFiles(dataDirectory); + var vaultPath = Path.Combine(vaultDirectory, CustomEntriesVaultFileName); + + if (customFiles.Count == 0) + { + // Remove stale custom vault if no custom entries remain + if (File.Exists(vaultPath)) + File.Delete(vaultPath); + return; + } + + var zipBytes = CreateMonthlyArchive(customFiles); + var encrypted = _crypto.EncryptData(zipBytes, password); + File.WriteAllBytes(vaultPath, encrypted); + } + + private static bool IsCustomEntriesVaultFile(string fileName) + => string.Equals(fileName, CustomEntriesVaultFileName, StringComparison.OrdinalIgnoreCase); + + // ── Database vault helpers ───────────────────────────────────── + + private const string DatabaseVaultPrefix = "_db_"; + private const string DatabaseVaultSuffix = ".vault"; + + private static bool IsReservedVaultFile(string fileName) + => fileName.StartsWith(DatabaseVaultPrefix, StringComparison.OrdinalIgnoreCase); + + private void SaveDatabaseVaults(string password, string vaultDirectory, string dataDirectory) + { + var dbFiles = Directory.GetFiles(dataDirectory, "*.db"); + foreach (var dbPath in dbFiles) + { + try + { + var dbFileName = Path.GetFileName(dbPath); + var vaultFileName = $"{DatabaseVaultPrefix}{dbFileName}{DatabaseVaultSuffix}"; + var vaultPath = Path.Combine(vaultDirectory, vaultFileName); + + var dbBytes = File.ReadAllBytes(dbPath); + var encrypted = _crypto.EncryptData(dbBytes, password); + File.WriteAllBytes(vaultPath, encrypted); + + Debug.WriteLine($"[VaultStorageService] Saved database vault: {vaultFileName}"); + } + catch (Exception ex) + { + Debug.WriteLine($"[VaultStorageService] Failed to save database vault for {Path.GetFileName(dbPath)}: {ex.Message}"); + } + } + } + + private void RestoreDatabaseVaults(string password, string vaultDirectory, string dataDirectory) + { + var dbVaultFiles = Directory.GetFiles(vaultDirectory, $"{DatabaseVaultPrefix}*{DatabaseVaultSuffix}"); + foreach (var vaultFile in dbVaultFiles) + { + try + { + var vaultFileName = Path.GetFileName(vaultFile); + // Strip prefix and suffix to get original DB filename + var dbFileName = vaultFileName[DatabaseVaultPrefix.Length..^DatabaseVaultSuffix.Length]; + if (string.IsNullOrWhiteSpace(dbFileName)) + continue; + + var encrypted = File.ReadAllBytes(vaultFile); + var dbBytes = _crypto.DecryptData(encrypted, password); + var targetPath = Path.Combine(dataDirectory, dbFileName); + File.WriteAllBytes(targetPath, dbBytes); + + Debug.WriteLine($"[VaultStorageService] Restored database from vault: {vaultFileName} → {dbFileName}"); + } + catch (CryptographicException) + { + Debug.WriteLine($"[VaultStorageService] Database vault decryption failed for {Path.GetFileName(vaultFile)} (likely wrong password)"); + } + catch (Exception ex) + { + Debug.WriteLine($"[VaultStorageService] Failed to restore database vault {Path.GetFileName(vaultFile)}: {ex.Message}"); + } + } + } + + private static void EnsureRequiredArguments(string password, string vaultDirectory, string dataDirectory) + { + if (string.IsNullOrWhiteSpace(password)) + throw new ArgumentException("Password cannot be empty.", nameof(password)); + if (string.IsNullOrWhiteSpace(vaultDirectory)) + throw new ArgumentException("Vault directory is required.", nameof(vaultDirectory)); + if (string.IsNullOrWhiteSpace(dataDirectory)) + throw new ArgumentException("Data directory is required.", nameof(dataDirectory)); + } + + private void SaveMonth(string password, string monthKey, List<string> filesInMonth, string vaultDirectory) + { + var monthDate = DateTime.ParseExact(monthKey, "yyyy-MM", CultureInfo.InvariantCulture); + var monthlyVaultPath = Path.Combine(vaultDirectory, GetMonthlyVaultFileName(monthDate)); + + var zipBytes = CreateMonthlyArchive(filesInMonth); + var encryptedPayload = _crypto.EncryptData(zipBytes, password); + File.WriteAllBytes(monthlyVaultPath, encryptedPayload); + + _monthFingerprintCache[monthKey] = ComputeMonthFingerprint(filesInMonth); + } + + private static byte[] CreateMonthlyArchive(List<string> filesInMonth) + { + using var memoryStream = new MemoryStream(); + using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, leaveOpen: true)) + { + foreach (var filePath in filesInMonth.OrderBy(Path.GetFileName, StringComparer.Ordinal)) + { + var fileName = Path.GetFileName(filePath); + if (string.IsNullOrWhiteSpace(fileName)) + continue; + + var entry = archive.CreateEntry(fileName, CompressionLevel.Optimal); + using var entryStream = entry.Open(); + using var sourceStream = File.OpenRead(filePath); + sourceStream.CopyTo(entryStream); + } + } + + return memoryStream.ToArray(); + } + + private static string ComputeMonthFingerprint(List<string> files) + { + using var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256); + + foreach (var filePath in files.OrderBy(Path.GetFileName, StringComparer.Ordinal)) + { + var fileInfo = new FileInfo(filePath); + if (!fileInfo.Exists) + continue; + + AppendUtf8(hash, fileInfo.Name); + AppendAscii(hash, fileInfo.LastWriteTimeUtc.Ticks.ToString(CultureInfo.InvariantCulture)); + AppendAscii(hash, fileInfo.Length.ToString(CultureInfo.InvariantCulture)); + } + + return Convert.ToHexString(hash.GetHashAndReset()).ToLowerInvariant(); + } + + private static void AppendUtf8(IncrementalHash hash, string value) => hash.AppendData(Encoding.UTF8.GetBytes(value)); + private static void AppendAscii(IncrementalHash hash, string value) => hash.AppendData(Encoding.ASCII.GetBytes(value)); + + private static void ExtractZipContent(byte[] zipBytes, string dataDirectory) + { + using var stream = new MemoryStream(zipBytes); + using var archive = new ZipArchive(stream, ZipArchiveMode.Read); + + var dataRoot = Path.GetFullPath(dataDirectory); + if (!dataRoot.EndsWith(Path.DirectorySeparatorChar)) + dataRoot += Path.DirectorySeparatorChar; + + foreach (var entry in archive.Entries) + { + if (string.IsNullOrEmpty(entry.Name)) + continue; + + var destinationPath = Path.GetFullPath(Path.Combine(dataDirectory, entry.FullName)); + if (!destinationPath.StartsWith(dataRoot, StringComparison.OrdinalIgnoreCase)) + throw new InvalidDataException("Zip entry path escapes target data directory."); + + var destinationDir = Path.GetDirectoryName(destinationPath); + if (!string.IsNullOrWhiteSpace(destinationDir)) + Directory.CreateDirectory(destinationDir); + + entry.ExtractToFile(destinationPath, overwrite: true); + } + } +} diff --git a/Journal.DevTool/Config/ConfigLoader.cs b/Journal.DevTool/Config/ConfigLoader.cs new file mode 100644 index 0000000..471003d --- /dev/null +++ b/Journal.DevTool/Config/ConfigLoader.cs @@ -0,0 +1,44 @@ +using System.Text.Json; + +namespace Sdt.Config; + +public static class ConfigLoader +{ + private static readonly JsonSerializerOptions JsonOptions = new() + { + PropertyNameCaseInsensitive = true, + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + AllowTrailingCommas = true, + ReadCommentHandling = JsonCommentHandling.Skip, + }; + + /// <summary> + /// Walks up from <paramref name="startDir"/> (or CWD) until it finds devtool.json. + /// Returns null if not found. + /// </summary> + public static (DevToolConfig Config, string ProjectRoot)? FindAndLoad(string? startDir = null) + { + var dir = new DirectoryInfo(startDir ?? Directory.GetCurrentDirectory()); + while (dir is not null) + { + var candidate = Path.Combine(dir.FullName, "devtool.json"); + if (File.Exists(candidate)) + { + try + { + var json = File.ReadAllText(candidate); + var config = JsonSerializer.Deserialize<DevToolConfig>(json, JsonOptions) + ?? throw new InvalidOperationException("devtool.json deserialized to null."); + return (config, dir.FullName); + } + catch (Exception ex) + { + throw new InvalidOperationException( + $"Failed to parse devtool.json at {candidate}: {ex.Message}", ex); + } + } + dir = dir.Parent!; + } + return null; + } +} diff --git a/Journal.DevTool/Config/DevToolConfig.cs b/Journal.DevTool/Config/DevToolConfig.cs new file mode 100644 index 0000000..fbb91a5 --- /dev/null +++ b/Journal.DevTool/Config/DevToolConfig.cs @@ -0,0 +1,86 @@ +namespace Sdt.Config; + +public sealed class DevToolConfig +{ + public string Name { get; init; } = "SDT Project"; + public string Version { get; init; } = "0.1.0"; + public List<BuildTarget> Targets { get; init; } = []; + public List<EnvVarDef> Env { get; init; } = []; + public ToolchainConfig? Toolchains { get; init; } +} + +public sealed class BuildTarget +{ + public string Id { get; init; } = ""; + public string Label { get; init; } = ""; + public string Description { get; init; } = ""; + public string Group { get; init; } = "General"; + + /// <summary>Executable name. Null = virtual aggregator (runs DependsOn only).</summary> + public string? Command { get; init; } + + public List<string> Args { get; init; } = []; + + /// <summary>Working directory relative to project root.</summary> + public string WorkingDir { get; init; } = "."; + + public List<string> DependsOn { get; init; } = []; +} + +public sealed class EnvVarDef +{ + public string Key { get; init; } = ""; + public string Description { get; init; } = ""; + + [System.Text.Json.Serialization.JsonPropertyName("default")] + public string DefaultValue { get; init; } = ""; + + /// <summary>If non-empty, shown as a dropdown. Otherwise free-text input.</summary> + public List<string> Options { get; init; } = []; +} + +// ── Toolchain config ────────────────────────────────────────────────────────── + +public sealed class ToolchainConfig +{ + public PythonToolchain? Python { get; init; } + public NodeToolchain? Node { get; init; } +} + +public sealed class PythonToolchain +{ + /// <summary>Python executable (e.g. "python3.14", "python").</summary> + public string Executable { get; init; } = "python"; + + /// <summary>Windows-specific override (e.g. "py" when using the launcher).</summary> + public string? WindowsExecutable { get; init; } + + /// <summary>Optional version flag to pass (e.g. "-3.14" for py launcher).</summary> + public string? LauncherVersion { get; init; } + + /// <summary>Venv directory relative to project root.</summary> + public string VenvDir { get; init; } = ".venv"; + + public List<PythonProfile> Profiles { get; init; } = []; + + /// <summary>Optional path to a pip wrapper script (relative to project root).</summary> + public string? PipScript { get; init; } +} + +public sealed class PythonProfile +{ + public string Id { get; init; } = ""; + public string Label { get; init; } = ""; + public string RequirementsFile { get; init; } = ""; + public string? ExtraIndexUrl { get; init; } + public List<string> PostInstallCommands { get; init; } = []; +} + +public sealed class NodeToolchain +{ + /// <summary>Package manager: "npm", "pnpm", or "yarn".</summary> + public string PackageManager { get; init; } = "npm"; + + /// <summary>Working directory for the frontend (relative to project root).</summary> + public string WorkingDir { get; init; } = "."; +} diff --git a/Journal.DevTool/Config/WorkspaceConfig.cs b/Journal.DevTool/Config/WorkspaceConfig.cs new file mode 100644 index 0000000..fce9cb7 --- /dev/null +++ b/Journal.DevTool/Config/WorkspaceConfig.cs @@ -0,0 +1,19 @@ +namespace Sdt.Config; + +public sealed class WorkspaceConfig +{ + public string Name { get; init; } = "SDT Workspace"; + public List<WorkspaceProject> Projects { get; init; } = []; +} + +public sealed class WorkspaceProject +{ + public string Name { get; init; } = ""; + public string Description { get; init; } = ""; + + /// <summary> + /// Relative path from the sdt-workspace.json directory to the project root + /// (the directory containing devtool.json). + /// </summary> + public string Path { get; init; } = ""; +} diff --git a/Journal.DevTool/Config/WorkspaceLoader.cs b/Journal.DevTool/Config/WorkspaceLoader.cs new file mode 100644 index 0000000..a01f324 --- /dev/null +++ b/Journal.DevTool/Config/WorkspaceLoader.cs @@ -0,0 +1,52 @@ +using System.Text.Json; + +namespace Sdt.Config; + +public static class WorkspaceLoader +{ + private const string FileName = "sdt-workspace.json"; + + private static readonly JsonSerializerOptions JsonOptions = new() + { + PropertyNameCaseInsensitive = true, + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + AllowTrailingCommas = true, + ReadCommentHandling = JsonCommentHandling.Skip, + }; + + /// <summary> + /// Walks up from <paramref name="startDir"/> (or CWD) to find sdt-workspace.json. + /// Returns null if not found. + /// </summary> + public static (WorkspaceConfig Config, string WorkspaceRoot)? FindAndLoad(string? startDir = null) + { + var dir = new DirectoryInfo(startDir ?? Directory.GetCurrentDirectory()); + while (dir is not null) + { + var candidate = Path.Combine(dir.FullName, FileName); + if (File.Exists(candidate)) + { + try + { + var json = File.ReadAllText(candidate); + var config = JsonSerializer.Deserialize<WorkspaceConfig>(json, JsonOptions) + ?? throw new InvalidOperationException($"{FileName} deserialized to null."); + return (config, dir.FullName); + } + catch (Exception ex) + { + throw new InvalidOperationException( + $"Failed to parse {FileName} at {candidate}: {ex.Message}", ex); + } + } + dir = dir.Parent!; + } + return null; + } + + /// <summary> + /// Resolves the absolute project root for a workspace project entry. + /// </summary> + public static string ResolveProjectRoot(string workspaceRoot, WorkspaceProject project) + => Path.GetFullPath(Path.Combine(workspaceRoot, project.Path)); +} diff --git a/Journal.DevTool/Journal.DevTool.csproj b/Journal.DevTool/Journal.DevTool.csproj new file mode 100644 index 0000000..5d8f248 --- /dev/null +++ b/Journal.DevTool/Journal.DevTool.csproj @@ -0,0 +1,17 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net10.0</TargetFramework> + <Nullable>enable</Nullable> + <ImplicitUsings>enable</ImplicitUsings> + <AssemblyName>sdt</AssemblyName> + <RootNamespace>Sdt</RootNamespace> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Spectre.Console" Version="0.49.1" /> + </ItemGroup> + +</Project> diff --git a/Journal.DevTool/Program.cs b/Journal.DevTool/Program.cs new file mode 100644 index 0000000..756f812 --- /dev/null +++ b/Journal.DevTool/Program.cs @@ -0,0 +1,57 @@ +using Sdt.Config; +using Sdt.Tui; +using Spectre.Console; + +// ── Workspace + project discovery ──────────────────────────────────────────── + +var workspaceResult = WorkspaceLoader.FindAndLoad(); +var projectResult = ConfigLoader.FindAndLoad(); + +if (projectResult is null) +{ + AnsiConsole.MarkupLine($"[bold {Theme.Red}]SDT:[/] [{Theme.Amber}]No devtool.json found[/] in current directory or any parent."); + AnsiConsole.MarkupLine(Theme.Faint("Create a devtool.json in your project root to get started.")); + return 1; +} + +// ── Main run loop (handles workspace project switching) ─────────────────────── + +var (currentConfig, currentRoot) = projectResult.Value; +var (workspace, workspaceRoot) = workspaceResult.HasValue + ? (workspaceResult.Value.Config, workspaceResult.Value.WorkspaceRoot) + : ((WorkspaceConfig?)null, (string?)null); + +try +{ + while (true) + { + var app = new App(currentConfig, currentRoot, workspace, workspaceRoot); + var result = await app.RunAsync(); + + if (result.Reason == AppExitReason.Quit) + break; + + // User switched projects — reload config from new root + if (result.Reason == AppExitReason.SwitchProject && result.NewProjectRoot is not null) + { + var loaded = ConfigLoader.FindAndLoad(result.NewProjectRoot); + if (loaded is null) + { + AnsiConsole.MarkupLine(Theme.Fail($"No devtool.json found at: {result.NewProjectRoot}")); + AnsiConsole.MarkupLine(Theme.Faint("Press any key to stay on current project...")); + Console.ReadKey(intercept: true); + continue; // go back to current app + } + + (currentConfig, currentRoot) = loaded.Value; + } + } + + return 0; +} +catch (Exception ex) +{ + AnsiConsole.MarkupLine(Theme.Fail($"Fatal: {ex.Message}")); + AnsiConsole.WriteException(ex, ExceptionFormats.ShortenEverything); + return 1; +} diff --git a/Journal.DevTool/README.md b/Journal.DevTool/README.md new file mode 100644 index 0000000..1f03773 --- /dev/null +++ b/Journal.DevTool/README.md @@ -0,0 +1,234 @@ +# SDT — Stan's Dev Tools + +> **Status: v0.1 — active development** +> Phosphor-green TUI build orchestrator. Currently embedded in Project Journal; long-term goal is a standalone universal dev tool. + +--- + +## What It Is + +SDT is a terminal UI (TUI) application for managing builds, toolchains, and multi-project workspaces. It reads a `devtool.json` from your project root and presents a menu-driven interface so you never have to remember which script to run, in what order, with what flags. + +``` + ____ ____ _____ +/ ___|| _ \|_ _| +\___ \| | | | | | + ___) | |_| | | | +|____/|____/ |_| +─────────── Project Journal v0.1.0 ───────────── +root: E:\stansshit\csharp\journal-master\journal + + What would you like to do? + BUILD + > Publish Sidecar Build Journal.Sidecar as self-contained exe + Build Web UI Build SvelteKit bundle + Publish WebGateway Publish ASP.NET host with embedded web UI + Build Tauri Desktop App Build desktop exe (no installer) + Full Release Build ✦ Sidecar → Web → WebGateway → Tauri, in order + ... + SYSTEM + ⬡ Toolchain management python / node + ⚙ Edit environment variables + ✗ Quit +``` + +--- + +## Current Features (v0.1) + +### Build Target Runner +- Menu driven by `devtool.json` — add/remove targets without touching SDT code +- **Dependency resolution**: targets declare `dependsOn`; SDT topologically sorts them and runs each step exactly once. Select `webgateway` and `web` runs first automatically. Select `all` and everything runs in the right order. +- **Live output streaming**: stdout in phosphor green, stderr in amber — you see the build as it happens +- Each step reports exit code and elapsed time + +### Environment Variable Editor +- All configurable env vars declared in `devtool.json` +- Dropdown selection for known options (e.g. `none`/`python-sidecar` for AI provider) +- Free-text input for path overrides +- Changes apply to SDT's process environment for the current session + +### Toolchain Management +Python: +- Detect system Python and venv status in one health-check table +- Create / recreate venv (`python -m venv`) +- Install requirements profile — select cpu / gpu / nlp, handles `--extra-index-url` automatically +- Upgrade pip +- Cross-platform venv path resolution (`Scripts/` on Windows, `bin/` on Linux/Mac) + +Node / npm: +- Detect Node.js and npm versions +- Check `node_modules` status +- Run `npm install` (or `pnpm`/`yarn` — configurable per project) + +### Multi-Project Workspace Switcher +- Place `sdt-workspace.json` in any parent directory listing your projects +- SDT detects it automatically on startup +- **Switch Project** appears in SYSTEM menu when workspace is loaded with more than one project +- Selecting a different project hot-reloads config in-process — no restart needed +- Project table shows current (`►`), path, and whether `devtool.json` exists + +--- + +## Running SDT + +From the project root (where `devtool.json` lives): + +```powershell +dotnet run --project Journal.DevTool/Journal.DevTool.csproj +``` + +Or via `just`: +```powershell +just sdt +``` + +SDT walks up the directory tree from wherever you launch it to find `devtool.json`. You don't need to be in any specific directory. + +--- + +## Config Files + +### `devtool.json` (per project) + +```json +{ + "name": "My Project", + "version": "1.0.0", + "toolchains": { + "python": { + "executable": "python3", + "venvDir": ".venv", + "profiles": [ + { "id": "default", "label": "Default", "requirementsFile": "requirements.txt" } + ] + }, + "node": { "packageManager": "npm", "workingDir": "frontend" } + }, + "targets": [ + { + "id": "build", + "label": "Build", + "description": "Build everything", + "group": "Build", + "command": "dotnet", + "args": ["build"], + "workingDir": ".", + "dependsOn": [] + } + ], + "env": [ + { + "key": "MY_VAR", + "description": "Controls something", + "default": "value", + "options": ["value", "other"] + } + ] +} +``` + +**Target fields:** +| Field | Description | +|-------|-------------| +| `id` | Unique identifier, referenced by `dependsOn` | +| `label` | Display name in the menu | +| `description` | Short hint shown in the menu | +| `group` | Menu category (BUILD / DEV / TEST / etc.) | +| `command` | Executable to run (`dotnet`, `pwsh`, `npm`, etc.) — `null` for virtual aggregator | +| `args` | Argument array passed to the executable | +| `workingDir` | Working directory relative to project root | +| `dependsOn` | List of target IDs that must run first | + +### `sdt-workspace.json` (per workspace, any parent directory) + +```json +{ + "name": "My Dev Workspace", + "projects": [ + { "name": "Project A", "description": "Does X", "path": "project-a" }, + { "name": "Project B", "description": "Does Y", "path": "../other-repo/project-b" } + ] +} +``` + +Paths are relative to the `sdt-workspace.json` file. Absolute paths also work. + +--- + +## Project Structure + +``` +Journal.DevTool/ +├── Journal.DevTool.csproj net10.0 exe, outputs as 'sdt' +├── Program.cs Entry point — discovers workspace + project, run loop +├── Config/ +│ ├── DevToolConfig.cs devtool.json models (BuildTarget, EnvVarDef, ToolchainConfig) +│ ├── ConfigLoader.cs Walks up dirs to find and parse devtool.json +│ ├── WorkspaceConfig.cs sdt-workspace.json model +│ └── WorkspaceLoader.cs Finds and parses sdt-workspace.json +├── Runner/ +│ ├── ProcessRunner.cs Runs a process with live stdout/stderr streaming +│ └── TargetRunner.cs Topological dependency resolver +└── Tui/ + ├── Theme.cs Phosphor green palette (#00FF41 + amber + red) + ├── App.cs Main TUI loop — banner, menu, target runner, env editor + ├── ToolchainScreen.cs Python venv/pip + Node/npm management + └── WorkspaceScreen.cs Project switcher +``` + +--- + +## Roadmap + +### v0.2 — Usability & Polish +- [ ] `--target <id>` flag for non-interactive single-target run (CI use) +- [ ] `--list` flag to print targets and exit +- [ ] Config validation with clear error messages on startup +- [ ] Build history — last run result + timestamp per target (persisted to `.sdt-state.json`) +- [ ] Parallel target execution for independent steps (opt-in per target) + +### v0.3 — Package Manager Depth +- [ ] Full pip environment health: list installed packages, outdated check +- [ ] npm/pnpm/yarn: show scripts from `package.json`, run arbitrary script +- [ ] Python version manager integration (pyenv, py launcher on Windows) +- [ ] Virtual environment activation hint for the current shell + +### v0.4 — Multi-Project & Workspace +- [ ] Workspace-level targets that span multiple projects (e.g. build all repos in order) +- [ ] Project dependency graph across workspace (project A's publish feeds project B's build) +- [ ] Workspace health dashboard — all projects' last-build status in one table + +### v0.5 — Env & Secrets +- [ ] `.env` file load/save support (per project and per workspace) +- [ ] Secret redaction in log output (already in Journal's LogRedactor — port to SDT) +- [ ] Environment profiles: save/load named env var sets (e.g. "dev", "staging") + +### v1.0 — Standalone Universal Tool +- [ ] Extract from Journal repo into its own standalone repository +- [ ] Publish as a `dotnet tool` (`dotnet tool install sdt`) +- [ ] Plugin system: projects can register custom SDT commands via `IsdtPlugin` +- [ ] GUI mode (Avalonia or web UI) as an optional launch mode — default CLI, `--gui` for graphical +- [ ] Linux and macOS first-class support (already mostly there — mainly path/exe resolution) +- [ ] JSON schema for `devtool.json` with IDE autocompletion + +### Long-term Vision +SDT's goal is to be **the single tool you open when you sit down at a project** — regardless of language, framework, or OS. Instead of remembering 15 different CLI commands across `dotnet`, `npm`, `pip`, `cargo`, `just`, and `pwsh`, you open SDT and it knows your project's shape from `devtool.json`. + +The workspace layer means you can manage a portfolio of projects — switching between them, running cross-project builds, and keeping a consistent interface across everything you work on. + +--- + +## Dependencies + +- [`Spectre.Console`](https://spectreconsole.net/) `0.49.1` — TUI rendering, selection prompts, tables, progress + +No dependency on `Journal.Core` — SDT is intentionally standalone so it can be extracted cleanly. + +--- + +## Notes + +- SDT does **not** set background colour — it renders on whatever your terminal's background is. A dark terminal is strongly recommended for the phosphor look. +- Environment variable changes made in SDT apply to SDT's own process environment for the session. They are **not** written to your system or shell permanently — by design. +- When a build step fails, SDT stops the plan and does not run subsequent steps. diff --git a/Journal.DevTool/Runner/ProcessRunner.cs b/Journal.DevTool/Runner/ProcessRunner.cs new file mode 100644 index 0000000..33516cc --- /dev/null +++ b/Journal.DevTool/Runner/ProcessRunner.cs @@ -0,0 +1,60 @@ +using System.Diagnostics; + +namespace Sdt.Runner; + +public sealed record RunResult(int ExitCode, TimeSpan Elapsed) +{ + public bool Success => ExitCode == 0; +} + +public static class ProcessRunner +{ + /// <summary> + /// Runs a command with the given args, streaming stdout/stderr via <paramref name="onOutput"/>. + /// onOutput receives (line, isStderr). + /// </summary> + public static async Task<RunResult> RunAsync( + string command, + IEnumerable<string> args, + string workingDir, + Action<string, bool> onOutput, + CancellationToken cancellationToken = default) + { + var psi = new ProcessStartInfo + { + FileName = command, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true, + WorkingDirectory = workingDir, + }; + + foreach (var arg in args) + psi.ArgumentList.Add(arg); + + var sw = Stopwatch.StartNew(); + + using var process = new Process { StartInfo = psi }; + process.Start(); + + var stdoutTask = DrainAsync(process.StandardOutput, line => onOutput(line, false), cancellationToken); + var stderrTask = DrainAsync(process.StandardError, line => onOutput(line, true), cancellationToken); + + await Task.WhenAll(stdoutTask, stderrTask).ConfigureAwait(false); + await process.WaitForExitAsync(cancellationToken).ConfigureAwait(false); + + sw.Stop(); + return new RunResult(process.ExitCode, sw.Elapsed); + } + + private static async Task DrainAsync(StreamReader reader, Action<string> emit, CancellationToken ct) + { + string? line; + while ((line = await reader.ReadLineAsync(ct).ConfigureAwait(false)) is not null + && !ct.IsCancellationRequested) + { + emit(line); + } + } +} diff --git a/Journal.DevTool/Runner/TargetRunner.cs b/Journal.DevTool/Runner/TargetRunner.cs new file mode 100644 index 0000000..b4c670e --- /dev/null +++ b/Journal.DevTool/Runner/TargetRunner.cs @@ -0,0 +1,41 @@ +using Sdt.Config; + +namespace Sdt.Runner; + +public static class TargetRunner +{ + /// <summary> + /// Returns the ordered list of real (non-virtual) steps needed to execute <paramref name="target"/>, + /// respecting DependsOn chains. Each step appears at most once. + /// </summary> + public static List<BuildTarget> ResolvePlan( + BuildTarget target, + IReadOnlyDictionary<string, BuildTarget> allTargets) + { + var visited = new HashSet<string>(StringComparer.OrdinalIgnoreCase); + var plan = new List<BuildTarget>(); + Visit(target, allTargets, visited, plan); + return plan; + } + + private static void Visit( + BuildTarget target, + IReadOnlyDictionary<string, BuildTarget> allTargets, + HashSet<string> visited, + List<BuildTarget> plan) + { + if (!visited.Add(target.Id)) + return; + + // Recurse into dependencies first (topological order) + foreach (var depId in target.DependsOn) + { + if (allTargets.TryGetValue(depId, out var dep)) + Visit(dep, allTargets, visited, plan); + } + + // Virtual aggregator targets (null Command) are just dependency collectors + if (target.Command is not null) + plan.Add(target); + } +} diff --git a/Journal.DevTool/Tui/App.cs b/Journal.DevTool/Tui/App.cs new file mode 100644 index 0000000..36abb65 --- /dev/null +++ b/Journal.DevTool/Tui/App.cs @@ -0,0 +1,303 @@ +using Sdt.Config; +using Sdt.Runner; +using Spectre.Console; + +namespace Sdt.Tui; + +/// <summary>Thin wrapper used in Spectre.Console selection prompts.</summary> +internal sealed record MenuItem(string Display, string Value); + +public enum AppExitReason { Quit, SwitchProject } +public sealed record AppResult(AppExitReason Reason, string? NewProjectRoot = null); + +public sealed class App( + DevToolConfig config, + string projectRoot, + WorkspaceConfig? workspace = null, + string? workspaceRoot = null) +{ + private DevToolConfig _config = config; + private string _projectRoot = projectRoot; + private readonly WorkspaceConfig? _workspace = workspace; + private readonly string? _workspaceRoot = workspaceRoot; + + private IReadOnlyDictionary<string, BuildTarget> TargetMap => + _config.Targets.ToDictionary(t => t.Id, StringComparer.OrdinalIgnoreCase); + + public async Task<AppResult> RunAsync() + { + while (true) + { + AnsiConsole.Clear(); + RenderBanner(); + + var choice = ShowMainMenu(); + + switch (choice) + { + case "__env__": + EditEnvironment(); + break; + + case "__toolchains__": + await new ToolchainScreen(_config, _projectRoot).RunAsync(); + break; + + case "__workspace__": + if (_workspace is not null && _workspaceRoot is not null) + { + var switcher = new WorkspaceScreen(_workspace, _workspaceRoot, _projectRoot); + var newRoot = switcher.SelectProject(); + if (newRoot is not null) + return new AppResult(AppExitReason.SwitchProject, newRoot); + } + break; + + case "__quit__": + AnsiConsole.MarkupLine("\n" + Theme.Faint("Later.") + "\n"); + return new AppResult(AppExitReason.Quit); + + default: + var targetMap = TargetMap; + if (targetMap.TryGetValue(choice, out var target)) + await RunTargetAsync(target, targetMap); + break; + } + + if (choice != "__quit__") + { + AnsiConsole.MarkupLine("\n" + Theme.Faint("Press any key to return to the menu...")); + Console.ReadKey(intercept: true); + } + } + } + + // ── Banner ──────────────────────────────────────────────────────────────── + + private void RenderBanner() + { + // Phosphor green figlet + AnsiConsole.Write(new FigletText("SDT").Color(Theme.GreenColor)); + + // Project + workspace info line + var wsInfo = _workspace is not null + ? $" [{Theme.GreenDim}]∙ {Markup.Escape(_workspace.Name)}[/]" + : string.Empty; + + AnsiConsole.Write( + new Rule($"[bold {Theme.GreenBold}]{Markup.Escape(_config.Name)}[/] [{Theme.GreenDim}]v{Markup.Escape(_config.Version)}[/]{wsInfo}") + .RuleStyle(Theme.DimStyle)); + + AnsiConsole.MarkupLine(Theme.Faint($"root: {_projectRoot}") + "\n"); + } + + // ── Main menu ───────────────────────────────────────────────────────────── + + private string ShowMainMenu() + { + var prompt = new SelectionPrompt<MenuItem>() + .Title($"[{Theme.Green}]What would you like to do?[/]") + .PageSize(28) + .MoreChoicesText(Theme.Faint("(scroll to see more)")) + .UseConverter(m => m.Display); + + // Targets, grouped + var groups = _config.Targets + .Where(t => !string.IsNullOrWhiteSpace(t.Label)) + .GroupBy(t => string.IsNullOrWhiteSpace(t.Group) ? "General" : t.Group); + + foreach (var group in groups) + { + var header = new MenuItem( + $"[bold {Theme.Amber}]{Markup.Escape(group.Key.ToUpperInvariant())}[/]", + "__group__"); + + var items = group.Select(t => new MenuItem( + $"[{Theme.Green}]{Markup.Escape(t.Label)}[/] [{Theme.GreenDim}]{Markup.Escape(t.Description)}[/]", + t.Id)).ToList(); + + prompt.AddChoiceGroup(header, items); + } + + // System actions + var systemItems = new List<MenuItem> + { + new($"[{Theme.Green}]⚙ Edit environment variables[/]", "__env__"), + }; + + if (_config.Toolchains is not null) + systemItems.Insert(0, new MenuItem( + $"[{Theme.Green}]⬡ Toolchain management[/] [{Theme.GreenDim}]python / node[/]", + "__toolchains__")); + + if (_workspace is not null && (_workspace.Projects.Count > 1)) + systemItems.Insert(0, new MenuItem( + $"[{Theme.Green}]⇄ Switch project[/] [{Theme.GreenDim}]{Markup.Escape(_workspace.Name)}[/]", + "__workspace__")); + + systemItems.Add(new MenuItem($"[{Theme.GreenDim}]✗ Quit[/]", "__quit__")); + + prompt.AddChoiceGroup( + new MenuItem($"[bold {Theme.Amber}]SYSTEM[/]", "__group__"), + systemItems); + + return AnsiConsole.Prompt(prompt).Value; + } + + // ── Target execution ────────────────────────────────────────────────────── + + private async Task RunTargetAsync(BuildTarget target, IReadOnlyDictionary<string, BuildTarget> targetMap) + { + AnsiConsole.Clear(); + AnsiConsole.Write(Theme.SectionRule(target.Label)); + + var plan = TargetRunner.ResolvePlan(target, targetMap); + + if (plan.Count == 0) + { + AnsiConsole.MarkupLine(Theme.Warn("This target has no executable steps.")); + return; + } + + if (plan.Count > 1) + { + AnsiConsole.MarkupLine(Theme.Faint($"Execution plan — {plan.Count} steps:")); + foreach (var step in plan) + AnsiConsole.MarkupLine($" [{Theme.GreenDim}]→[/] [{Theme.Green}]{Markup.Escape(step.Label)}[/]"); + AnsiConsole.WriteLine(); + } + + var allOk = true; + var totalSw = System.Diagnostics.Stopwatch.StartNew(); + + foreach (var step in plan) + { + AnsiConsole.Write(Theme.DimRule()); + + var workingDir = Path.GetFullPath(Path.Combine(_projectRoot, step.WorkingDir)); + var cmdDisplay = $"{step.Command} {string.Join(" ", step.Args)}"; + + AnsiConsole.MarkupLine($"[{Theme.GreenDim}]$ {Markup.Escape(cmdDisplay)}[/]"); + AnsiConsole.MarkupLine($"[{Theme.GreenDim}] {Markup.Escape(workingDir)}[/]\n"); + + RunResult result; + try + { + result = await ProcessRunner.RunAsync( + step.Command!, + step.Args, + workingDir, + (line, isErr) => + { + var escaped = Markup.Escape(line); + AnsiConsole.MarkupLine(isErr + ? $"[{Theme.Amber}]{escaped}[/]" + : $"[{Theme.Green}]{escaped}[/]"); + }); + } + catch (Exception ex) + { + AnsiConsole.MarkupLine("\n" + Theme.Fail($"Failed to launch: {ex.Message}")); + allOk = false; + break; + } + + AnsiConsole.WriteLine(); + + if (result.Success) + AnsiConsole.MarkupLine(Theme.Ok($"{step.Label} ({result.Elapsed.TotalSeconds:F1}s)")); + else + { + AnsiConsole.MarkupLine(Theme.Fail($"{step.Label} — exited {result.ExitCode} ({result.Elapsed.TotalSeconds:F1}s)")); + allOk = false; + break; + } + } + + totalSw.Stop(); + AnsiConsole.Write(Theme.SectionRule()); + AnsiConsole.MarkupLine(allOk + ? "\n" + Theme.Ok($"Done! Total: {totalSw.Elapsed.TotalSeconds:F1}s") + : "\n" + Theme.Fail("Build failed. Check output above.")); + } + + // ── Environment editor ──────────────────────────────────────────────────── + + private void EditEnvironment() + { + AnsiConsole.Clear(); + + if (_config.Env.Count == 0) + { + AnsiConsole.MarkupLine(Theme.Warn("No environment variables defined in devtool.json.")); + AnsiConsole.MarkupLine("\n" + Theme.Faint("Press any key to go back...")); + Console.ReadKey(intercept: true); + return; + } + + while (true) + { + AnsiConsole.Write(Theme.SectionRule("ENVIRONMENT")); + + var table = new Table() + .Border(TableBorder.Rounded) + .BorderStyle(Theme.DimStyle) + .AddColumn(new TableColumn($"[{Theme.Amber}]Variable[/]")) + .AddColumn(new TableColumn($"[{Theme.Amber}]Current Value[/]")) + .AddColumn(new TableColumn($"[{Theme.Amber}]Description[/]")); + + foreach (var def in _config.Env) + { + var val = Environment.GetEnvironmentVariable(def.Key) ?? def.DefaultValue; + table.AddRow( + Theme.Warn(def.Key), + Theme.Bold(val.Length > 0 ? val : "(not set)"), + Theme.Faint(def.Description)); + } + + AnsiConsole.Write(table); + AnsiConsole.MarkupLine(Theme.Faint("Changes apply to this SDT session only.\n")); + + var choices = _config.Env + .Select(e => + { + var curr = Environment.GetEnvironmentVariable(e.Key) ?? e.DefaultValue; + return new MenuItem( + $"[{Theme.Amber}]{Markup.Escape(e.Key)}[/] [{Theme.GreenDim}]= {Markup.Escape(curr)}[/]", + e.Key); + }) + .Append(new MenuItem(Theme.Faint("← Back"), "__back__")) + .ToList(); + + var selected = AnsiConsole.Prompt( + new SelectionPrompt<MenuItem>() + .Title($"[{Theme.Green}]Select a variable to edit:[/]") + .UseConverter(m => m.Display) + .AddChoices(choices)); + + if (selected.Value == "__back__") break; + + var envDef = _config.Env.First(e => e.Key == selected.Value); + var current = Environment.GetEnvironmentVariable(envDef.Key) ?? envDef.DefaultValue; + + string newVal; + if (envDef.Options.Count > 0) + { + newVal = AnsiConsole.Prompt( + new SelectionPrompt<string>() + .Title($"[{Theme.Amber}]{Markup.Escape(envDef.Key)}[/] [{Theme.GreenDim}]current: {Markup.Escape(current)}[/]") + .AddChoices(envDef.Options)); + } + else + { + newVal = AnsiConsole.Ask( + $"[{Theme.Amber}]{Markup.Escape(envDef.Key)}[/]", current); + } + + Environment.SetEnvironmentVariable(envDef.Key, newVal); + AnsiConsole.MarkupLine("\n" + Theme.Ok($"{envDef.Key} = {newVal}") + "\n"); + Thread.Sleep(500); + AnsiConsole.Clear(); + } + } +} diff --git a/Journal.DevTool/Tui/Theme.cs b/Journal.DevTool/Tui/Theme.cs new file mode 100644 index 0000000..3593e86 --- /dev/null +++ b/Journal.DevTool/Tui/Theme.cs @@ -0,0 +1,54 @@ +using Spectre.Console; + +namespace Sdt.Tui; + +/// <summary> +/// SDT phosphor-green colour palette. +/// Primary text is classic terminal phosphor (#00FF41). +/// Modern accent colours are kept for highlights and status. +/// </summary> +internal static class Theme +{ + // ── Hex colour constants (use in Spectre markup strings) ───────────────── + public const string Green = "#00ff41"; // primary phosphor — all normal text + public const string GreenDim = "#005c1b"; // muted — borders, secondary info + public const string GreenBold = "#a8ff90"; // bright — selections, emphasis + public const string Amber = "#ffb300"; // warnings / group titles + public const string Red = "#ff4040"; // errors + public const string Ghost = "#003d12"; // near-invisible — decorative scanlines + + // ── Spectre Color instances (for FigletText, Rule styles, etc.) ────────── + public static readonly Color GreenColor = new(0, 255, 65); + public static readonly Color GreenDimColor = new(0, 92, 27); + public static readonly Color GreenBoldColor = new(168, 255, 144); + public static readonly Color AmberColor = new(255, 179, 0); + public static readonly Color RedColor = new(255, 64, 64); + + // ── Pre-built Style objects ─────────────────────────────────────────────── + public static readonly Style PrimaryStyle = new(GreenColor); + public static readonly Style DimStyle = new(GreenDimColor); + public static readonly Style BrightStyle = new(GreenBoldColor, decoration: Decoration.Bold); + public static readonly Style AmberStyle = new(AmberColor); + public static readonly Style RedStyle = new(RedColor, decoration: Decoration.Bold); + + // ── Markup helper methods (auto-escape user content) ───────────────────── + public static string G(string t) => $"[{Green}]{Markup.Escape(t)}[/]"; + public static string Faint(string t) => $"[{GreenDim}]{Markup.Escape(t)}[/]"; + public static string Bold(string t) => $"[bold {GreenBold}]{Markup.Escape(t)}[/]"; + public static string Warn(string t) => $"[{Amber}]{Markup.Escape(t)}[/]"; + public static string Err(string t) => $"[bold {Red}]{Markup.Escape(t)}[/]"; + public static string Ok(string t) => $"[bold {Green}]✓ {Markup.Escape(t)}[/]"; + public static string Fail(string t) => $"[bold {Red}]✗ {Markup.Escape(t)}[/]"; + + // ── Shared UI components ────────────────────────────────────────────────── + public static Rule SectionRule(string? title = null) => title is null + ? new Rule().RuleStyle(DimStyle) + : new Rule($"[bold {GreenBold}]{Markup.Escape(title)}[/]").RuleStyle(DimStyle); + + public static Rule DimRule() => new Rule().RuleStyle(new Style(new Color(0, 40, 12))); + + public static Panel StatusPanel(string markup) => + new Panel(markup) + .BorderStyle(DimStyle) + .Padding(1, 0); +} diff --git a/Journal.DevTool/Tui/ToolchainScreen.cs b/Journal.DevTool/Tui/ToolchainScreen.cs new file mode 100644 index 0000000..96a8ec4 --- /dev/null +++ b/Journal.DevTool/Tui/ToolchainScreen.cs @@ -0,0 +1,313 @@ +using Sdt.Config; +using Sdt.Runner; +using Sdt.Tui; +using Spectre.Console; + +namespace Sdt.Tui; + +public sealed class ToolchainScreen(DevToolConfig config, string projectRoot) +{ + private readonly DevToolConfig _config = config; + private readonly string _projectRoot = projectRoot; + + public async Task RunAsync() + { + while (true) + { + AnsiConsole.Clear(); + AnsiConsole.Write(Theme.SectionRule("TOOLCHAINS")); + AnsiConsole.WriteLine(); + + var tc = _config.Toolchains; + if (tc is null) + { + AnsiConsole.MarkupLine(Theme.Warn("No toolchains configured in devtool.json.")); + AnsiConsole.MarkupLine(Theme.Faint("Add a \"toolchains\" section with \"python\" and/or \"node\" entries.")); + AnsiConsole.MarkupLine("\n" + Theme.Faint("Press any key to go back...")); + Console.ReadKey(intercept: true); + return; + } + + // Build menu from available toolchains + var choices = new List<MenuItem>(); + + if (tc.Python is not null) + { + choices.Add(new MenuItem($"[bold {Theme.GreenBold}]PYTHON[/]", "__group__")); + choices.Add(new MenuItem($"{Theme.G("Check environment")} {Theme.Faint("detect python, venv, pip")}", "py:check")); + choices.Add(new MenuItem($"{Theme.G("Create / recreate venv")} {Theme.Faint($"python -m venv {tc.Python.VenvDir}")}", "py:venv")); + if (tc.Python.Profiles.Count > 0) + choices.Add(new MenuItem($"{Theme.G("Install requirements profile")} {Theme.Faint("select cpu / gpu / nlp...")}", "py:install")); + choices.Add(new MenuItem($"{Theme.G("Upgrade pip")} {Theme.Faint("pip install --upgrade pip")}", "py:upgradepip")); + } + + if (tc.Node is not null) + { + choices.Add(new MenuItem($"[bold {Theme.GreenBold}]NODE / NPM[/]", "__group__")); + choices.Add(new MenuItem($"{Theme.G("Check environment")} {Theme.Faint("detect node, npm, node_modules")}", "node:check")); + choices.Add(new MenuItem($"{Theme.G($"{tc.Node.PackageManager} install")} {Theme.Faint($"in {tc.Node.WorkingDir}")}", "node:install")); + } + + choices.Add(new MenuItem($"[bold {Theme.GreenBold}]──[/]", "__group__")); + choices.Add(new MenuItem(Theme.Faint("← Back"), "__back__")); + + var prompt = new SelectionPrompt<MenuItem>() + .Title($"[{Theme.Green}]Select a toolchain action:[/]") + .PageSize(20) + .UseConverter(m => m.Display) + .AddChoices(choices); + + var selected = AnsiConsole.Prompt(prompt); + if (selected.Value == "__back__" || selected.Value == "__group__") return; + + AnsiConsole.Clear(); + AnsiConsole.Write(Theme.SectionRule(selected.Value.Split(':')[0].ToUpperInvariant() + " › " + selected.Value.Split(':')[1])); + AnsiConsole.WriteLine(); + + await HandleActionAsync(selected.Value, tc); + + AnsiConsole.MarkupLine("\n" + Theme.Faint("Press any key to continue...")); + Console.ReadKey(intercept: true); + } + } + + // ── Actions ─────────────────────────────────────────────────────────────── + + private async Task HandleActionAsync(string action, ToolchainConfig tc) + { + switch (action) + { + case "py:check": await CheckPythonAsync(tc.Python!); break; + case "py:venv": await CreateVenvAsync(tc.Python!); break; + case "py:install": await InstallProfileAsync(tc.Python!); break; + case "py:upgradepip": await UpgradePipAsync(tc.Python!); break; + case "node:check": await CheckNodeAsync(tc.Node!); break; + case "node:install": await NodeInstallAsync(tc.Node!); break; + } + } + + // ── Python ──────────────────────────────────────────────────────────────── + + private async Task CheckPythonAsync(PythonToolchain py) + { + var exe = ResolvePythonExe(py); + var venvPath = Path.GetFullPath(Path.Combine(_projectRoot, py.VenvDir)); + var venvPython = GetVenvPython(venvPath); + + var table = new Table() + .Border(TableBorder.Rounded) + .BorderStyle(Theme.DimStyle) + .AddColumn(new TableColumn($"[{Theme.Amber}]Check[/]").Width(24)) + .AddColumn(new TableColumn($"[{Theme.GreenBold}]Result[/]")); + + // System Python + var pyVersion = await ProbeAsync(exe, "--version"); + table.AddRow(Theme.G("System Python"), pyVersion is not null + ? Theme.Ok(pyVersion.Trim()) + : Theme.Fail($"{exe} not found")); + + // Venv exists? + table.AddRow(Theme.G($"Venv ({py.VenvDir})"), Directory.Exists(venvPath) + ? Theme.Ok("exists " + venvPath) + : Theme.Warn("not found — use 'Create venv'")); + + // Venv Python + if (File.Exists(venvPython)) + { + var venvVersion = await ProbeAsync(venvPython, "--version"); + table.AddRow(Theme.G("Venv Python"), venvVersion is not null + ? Theme.Ok(venvVersion.Trim()) + : Theme.Fail("could not launch")); + } + + // Pip in venv + if (File.Exists(venvPython)) + { + var pipVersion = await ProbeAsync(venvPython, "-m", "pip", "--version"); + table.AddRow(Theme.G("Pip (venv)"), pipVersion is not null + ? Theme.Ok(pipVersion.Trim()) + : Theme.Fail("pip not available")); + } + + AnsiConsole.Write(table); + } + + private async Task CreateVenvAsync(PythonToolchain py) + { + var exe = ResolvePythonExe(py); + var venvDir = py.VenvDir; + var venvPath = Path.GetFullPath(Path.Combine(_projectRoot, venvDir)); + + if (Directory.Exists(venvPath)) + { + var overwrite = AnsiConsole.Confirm( + $"[{Theme.Amber}]Venv already exists at {venvDir}. Recreate it?[/]", defaultValue: false); + if (!overwrite) return; + Directory.Delete(venvPath, recursive: true); + } + + AnsiConsole.MarkupLine(Theme.G($"Creating venv: {exe} -m venv {venvDir}")); + AnsiConsole.WriteLine(); + + await RunLiveAsync(exe, ["-m", "venv", venvDir], _projectRoot); + } + + private async Task InstallProfileAsync(PythonToolchain py) + { + var venvPath = Path.GetFullPath(Path.Combine(_projectRoot, py.VenvDir)); + var venvPy = GetVenvPython(venvPath); + + if (!File.Exists(venvPy)) + { + AnsiConsole.MarkupLine(Theme.Warn("Venv not found. Create it first.")); + return; + } + + var profile = AnsiConsole.Prompt( + new SelectionPrompt<PythonProfile>() + .Title($"[{Theme.Green}]Select requirements profile:[/]") + .UseConverter(p => $"{Theme.Bold(p.Label)} {Theme.Faint(p.RequirementsFile)}") + .AddChoices(py.Profiles)); + + var reqFile = Path.GetFullPath(Path.Combine(_projectRoot, profile.RequirementsFile)); + if (!File.Exists(reqFile)) + { + AnsiConsole.MarkupLine(Theme.Fail($"Requirements file not found: {reqFile}")); + return; + } + + // Upgrade pip first + AnsiConsole.MarkupLine(Theme.Faint("Upgrading pip...")); + await RunLiveAsync(venvPy, ["-m", "pip", "install", "--upgrade", "pip"], _projectRoot); + + // Build install args + var installArgs = new List<string> { "-m", "pip", "install" }; + if (!string.IsNullOrWhiteSpace(profile.ExtraIndexUrl)) + { + installArgs.Add("--extra-index-url"); + installArgs.Add(profile.ExtraIndexUrl); + } + installArgs.Add("-r"); + installArgs.Add(reqFile); + + AnsiConsole.WriteLine(); + AnsiConsole.MarkupLine(Theme.G($"Installing {profile.Label}...")); + AnsiConsole.WriteLine(); + await RunLiveAsync(venvPy, installArgs, _projectRoot); + + // Post-install commands + foreach (var cmd in profile.PostInstallCommands) + { + AnsiConsole.WriteLine(); + AnsiConsole.MarkupLine(Theme.Faint($"Post-install: {cmd}")); + var parts = cmd.Split(' ', 2); + var postArgs = parts.Length > 1 ? parts[1].Split(' ') : Array.Empty<string>(); + await RunLiveAsync(venvPy, ["-m", .. postArgs], _projectRoot); + } + } + + private async Task UpgradePipAsync(PythonToolchain py) + { + var venvPath = Path.GetFullPath(Path.Combine(_projectRoot, py.VenvDir)); + var venvPy = GetVenvPython(venvPath); + var exe = File.Exists(venvPy) ? venvPy : ResolvePythonExe(py); + + AnsiConsole.MarkupLine(Theme.G($"Upgrading pip using: {exe}")); + AnsiConsole.WriteLine(); + await RunLiveAsync(exe, ["-m", "pip", "install", "--upgrade", "pip"], _projectRoot); + } + + // ── Node ────────────────────────────────────────────────────────────────── + + private async Task CheckNodeAsync(NodeToolchain node) + { + var nodeModules = Path.GetFullPath( + Path.Combine(_projectRoot, node.WorkingDir, "node_modules")); + + var table = new Table() + .Border(TableBorder.Rounded) + .BorderStyle(Theme.DimStyle) + .AddColumn(new TableColumn($"[{Theme.Amber}]Check[/]").Width(24)) + .AddColumn(new TableColumn($"[{Theme.GreenBold}]Result[/]")); + + var nodeVersion = await ProbeAsync("node", "--version"); + table.AddRow(Theme.G("Node.js"), nodeVersion is not null + ? Theme.Ok(nodeVersion.Trim()) + : Theme.Fail("node not found in PATH")); + + var npmVersion = await ProbeAsync(node.PackageManager, "--version"); + table.AddRow(Theme.G(node.PackageManager), npmVersion is not null + ? Theme.Ok(npmVersion.Trim()) + : Theme.Fail($"{node.PackageManager} not found in PATH")); + + table.AddRow(Theme.G("node_modules"), Directory.Exists(nodeModules) + ? Theme.Ok("exists") + : Theme.Warn($"not found — run {node.PackageManager} install")); + + AnsiConsole.Write(table); + } + + private async Task NodeInstallAsync(NodeToolchain node) + { + var workDir = Path.GetFullPath(Path.Combine(_projectRoot, node.WorkingDir)); + AnsiConsole.MarkupLine(Theme.G($"{node.PackageManager} install ({workDir})")); + AnsiConsole.WriteLine(); + await RunLiveAsync(node.PackageManager, ["install"], workDir); + } + + // ── Helpers ─────────────────────────────────────────────────────────────── + + private static string ResolvePythonExe(PythonToolchain py) + { + if (OperatingSystem.IsWindows() && !string.IsNullOrWhiteSpace(py.WindowsExecutable)) + return py.WindowsExecutable; + return py.Executable; + } + + private static string GetVenvPython(string venvPath) + { + // Windows: .venv\Scripts\python.exe | Linux/Mac: .venv/bin/python + return OperatingSystem.IsWindows() + ? Path.Combine(venvPath, "Scripts", "python.exe") + : Path.Combine(venvPath, "bin", "python"); + } + + private static async Task<string?> ProbeAsync(string command, params string[] args) + { + try + { + var psi = new System.Diagnostics.ProcessStartInfo + { + FileName = command, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true, + }; + foreach (var a in args) psi.ArgumentList.Add(a); + + using var p = new System.Diagnostics.Process { StartInfo = psi }; + p.Start(); + var output = await p.StandardOutput.ReadToEndAsync(); + var err = await p.StandardError.ReadToEndAsync(); + await p.WaitForExitAsync(); + return p.ExitCode == 0 ? (output + err) : null; + } + catch { return null; } + } + + private static async Task RunLiveAsync(string command, IEnumerable<string> args, string workingDir) + { + var result = await ProcessRunner.RunAsync( + command, args, workingDir, + (line, isErr) => AnsiConsole.MarkupLine( + isErr + ? $"[{Theme.Amber}]{Markup.Escape(line)}[/]" + : $"[{Theme.Green}]{Markup.Escape(line)}[/]")); + + AnsiConsole.WriteLine(); + AnsiConsole.MarkupLine(result.Success + ? Theme.Ok($"Done ({result.Elapsed.TotalSeconds:F1}s)") + : Theme.Fail($"Exited {result.ExitCode} ({result.Elapsed.TotalSeconds:F1}s)")); + } +} diff --git a/Journal.DevTool/Tui/WorkspaceScreen.cs b/Journal.DevTool/Tui/WorkspaceScreen.cs new file mode 100644 index 0000000..38d6a37 --- /dev/null +++ b/Journal.DevTool/Tui/WorkspaceScreen.cs @@ -0,0 +1,101 @@ +using Sdt.Config; +using Spectre.Console; + +namespace Sdt.Tui; + +public sealed class WorkspaceScreen(WorkspaceConfig workspace, string workspaceRoot, string currentProjectRoot) +{ + private readonly WorkspaceConfig _workspace = workspace; + private readonly string _workspaceRoot = workspaceRoot; + private readonly string _currentProjectRoot = currentProjectRoot; + + /// <summary> + /// Shows the project switcher. Returns the absolute path to the selected project root, + /// or null if the user cancelled. + /// </summary> + public string? SelectProject() + { + AnsiConsole.Clear(); + AnsiConsole.Write(Theme.SectionRule("WORKSPACE — " + _workspace.Name)); + AnsiConsole.WriteLine(); + + var projects = _workspace.Projects; + if (projects.Count == 0) + { + AnsiConsole.MarkupLine(Theme.Warn("No projects defined in sdt-workspace.json.")); + AnsiConsole.MarkupLine(Theme.Faint("Add entries to the \"projects\" array.")); + AnsiConsole.MarkupLine("\n" + Theme.Faint("Press any key to go back...")); + Console.ReadKey(intercept: true); + return null; + } + + // Build choice list with current project marked + var choices = new List<WorkspaceMenuItem>(); + foreach (var proj in projects) + { + var absPath = WorkspaceLoader.ResolveProjectRoot(_workspaceRoot, proj); + var devtoolPath = Path.Combine(absPath, "devtool.json"); + var isCurrent = string.Equals(absPath, _currentProjectRoot, StringComparison.OrdinalIgnoreCase); + var exists = File.Exists(devtoolPath); + + var label = isCurrent + ? $"[bold {Theme.GreenBold}]► {Markup.Escape(proj.Name)}[/] [{Theme.GreenDim}](current)[/]" + : $"[{Theme.Green}] {Markup.Escape(proj.Name)}[/]"; + + var desc = !exists + ? $" [{Theme.Red}]devtool.json not found[/]" + : string.IsNullOrWhiteSpace(proj.Description) + ? $" [{Theme.GreenDim}]{Markup.Escape(absPath)}[/]" + : $" [{Theme.GreenDim}]{Markup.Escape(proj.Description)}[/]"; + + choices.Add(new WorkspaceMenuItem(label + "\n" + desc, absPath, exists && !isCurrent)); + } + + choices.Add(new WorkspaceMenuItem($"[{Theme.GreenDim}]← Cancel[/]", null, true)); + + // Show project table for overview + var table = new Table() + .Border(TableBorder.Rounded) + .BorderStyle(Theme.DimStyle) + .AddColumn(new TableColumn($"[{Theme.Amber}]Project[/]")) + .AddColumn(new TableColumn($"[{Theme.Amber}]Path[/]")) + .AddColumn(new TableColumn($"[{Theme.Amber}]Status[/]").Width(12)); + + foreach (var proj in projects) + { + var absPath = WorkspaceLoader.ResolveProjectRoot(_workspaceRoot, proj); + var isCurrent = string.Equals(absPath, _currentProjectRoot, StringComparison.OrdinalIgnoreCase); + var hasConfig = File.Exists(Path.Combine(absPath, "devtool.json")); + + table.AddRow( + isCurrent + ? $"[bold {Theme.GreenBold}]► {Markup.Escape(proj.Name)}[/]" + : Theme.G(proj.Name), + Theme.Faint(proj.Path), + hasConfig ? Theme.Ok("ready") : Theme.Fail("no config")); + } + + AnsiConsole.Write(table); + AnsiConsole.WriteLine(); + + var switchable = choices.Where(c => c.Selectable).ToList(); + if (switchable.Count == 1) // only Cancel + { + AnsiConsole.MarkupLine(Theme.Warn("No other projects available to switch to.")); + AnsiConsole.MarkupLine("\n" + Theme.Faint("Press any key to go back...")); + Console.ReadKey(intercept: true); + return null; + } + + var selected = AnsiConsole.Prompt( + new SelectionPrompt<WorkspaceMenuItem>() + .Title($"[{Theme.Green}]Switch to project:[/]") + .PageSize(15) + .UseConverter(m => m.Display) + .AddChoices(switchable)); + + return selected.AbsPath; // null = cancelled + } + + private sealed record WorkspaceMenuItem(string Display, string? AbsPath, bool Selectable); +} diff --git a/Journal.Sidecar/App.cs b/Journal.Sidecar/App.cs new file mode 100644 index 0000000..e3246b5 --- /dev/null +++ b/Journal.Sidecar/App.cs @@ -0,0 +1,13 @@ +using Microsoft.Extensions.DependencyInjection; +using Journal.Core; +using Journal.Core.Services.Sidecar; + +var services = new ServiceCollection(); +services.AddFragmentServices(); +services.AddSingleton<Entry>(); +var provider = services.BuildServiceProvider(); + +var entry = provider.GetRequiredService<Entry>(); +var cli = provider.GetRequiredService<SidecarCli>(); +var exitCode = await cli.RunAsync(args, entry); +Environment.ExitCode = exitCode; diff --git a/Journal.Sidecar/Journal.Sidecar.csproj b/Journal.Sidecar/Journal.Sidecar.csproj new file mode 100644 index 0000000..d9b4688 --- /dev/null +++ b/Journal.Sidecar/Journal.Sidecar.csproj @@ -0,0 +1,18 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net10.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Journal.Core\Journal.Core.csproj" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.3" /> + </ItemGroup> + +</Project> diff --git a/Journal.SmokeTests/Fixtures/transport_cases.json b/Journal.SmokeTests/Fixtures/transport_cases.json new file mode 100644 index 0000000..b6c84dd --- /dev/null +++ b/Journal.SmokeTests/Fixtures/transport_cases.json @@ -0,0 +1,50 @@ +[ + { + "name": "List returns array envelope", + "request": "{\"action\":\"fragments.list\"}", + "expectOk": true, + "dataKind": "array" + }, + { + "name": "Create returns object envelope", + "request": "{\"action\":\"fragments.create\",\"payload\":{\"type\":\"!NOTE\",\"description\":\"fixture create\"}}", + "expectOk": true, + "dataKind": "object" + }, + { + "name": "Get missing id returns null data", + "request": "{\"action\":\"fragments.get\",\"id\":\"00000000-0000-0000-0000-000000000001\"}", + "expectOk": true, + "dataKind": "null" + }, + { + "name": "Create missing payload fails", + "request": "{\"action\":\"fragments.create\"}", + "expectOk": false, + "errorContains": "payload" + }, + { + "name": "AI health returns object envelope", + "request": "{\"action\":\"ai.health\"}", + "expectOk": true, + "dataKind": "object" + }, + { + "name": "AI summarize entry returns string envelope", + "request": "{\"action\":\"ai.summarize_entry\",\"payload\":{\"content\":\"transport test\"}}", + "expectOk": true, + "dataKind": "string" + }, + { + "name": "Unknown action fails", + "request": "{\"action\":\"unknown.action\"}", + "expectOk": false, + "errorContains": "Unknown action" + }, + { + "name": "Malformed JSON fails", + "request": "{\"action\":\"fragments.list\"", + "expectOk": false, + "errorContains": "Invalid command JSON" + } +] diff --git a/Journal.SmokeTests/GlobalUsings.cs b/Journal.SmokeTests/GlobalUsings.cs new file mode 100644 index 0000000..9fe682e --- /dev/null +++ b/Journal.SmokeTests/GlobalUsings.cs @@ -0,0 +1,19 @@ +global using System.ComponentModel.DataAnnotations; +global using System.IO.Compression; +global using System.Security.Cryptography; +global using System.Text.Json; +global using Journal.Core; +global using Journal.Core.Dtos; +global using Journal.Core.Models; +global using Journal.Core.Repositories; +global using Journal.Core.Services.Ai; +global using Journal.Core.Services.Config; +global using Journal.Core.Services.Database; +global using Journal.Core.Services.Entries; +global using Journal.Core.Services.Fragments; +global using Journal.Core.Services.Logging; +global using Journal.Core.Services.Speech; +global using Journal.Core.Services.Sidecar; +global using Journal.Core.Services.Lists; +global using Journal.Core.Services.Todos; +global using Journal.Core.Services.Vault; diff --git a/Journal.SmokeTests/Journal.SmokeTests.csproj b/Journal.SmokeTests/Journal.SmokeTests.csproj new file mode 100644 index 0000000..a81680c --- /dev/null +++ b/Journal.SmokeTests/Journal.SmokeTests.csproj @@ -0,0 +1,20 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net10.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Journal.Core\Journal.Core.csproj" /> + </ItemGroup> + + <ItemGroup> + <None Update="Fixtures\*.json"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + </ItemGroup> + +</Project> diff --git a/Journal.SmokeTests/Program.AiSpeechTests.cs b/Journal.SmokeTests/Program.AiSpeechTests.cs new file mode 100644 index 0000000..50f7fce --- /dev/null +++ b/Journal.SmokeTests/Program.AiSpeechTests.cs @@ -0,0 +1,342 @@ +internal static partial class Program +{ + static async Task TestEntryAiHealthDefaultAsync() + { + var entry = NewEntry(); + var response = await entry.HandleCommandAsync("""{"action":"ai.health"}"""); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for ai.health."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.GetProperty("Enabled").GetBoolean() is false, "Expected AI disabled by default."); + Assert(string.Equals(data.GetProperty("Provider").GetString(), "none", StringComparison.OrdinalIgnoreCase), "Expected default provider 'none'."); + } + + static async Task TestEntryAiSummarizeEntryDisabledAsync() + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "ai.summarize_entry", + payload = new + { + content = "sample entry" + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for disabled ai.summarize_entry."); + var data = doc.RootElement.GetProperty("data").GetString() ?? ""; + Assert(data.Contains("disabled", StringComparison.OrdinalIgnoreCase), "Expected disabled provider message for ai.summarize_entry."); + } + + static async Task TestEntryAiSummarizeAllDisabledAsync() + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "ai.summarize_all", + payload = new + { + entries = new[] { "entry one", "entry two" } + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for disabled ai.summarize_all."); + var data = doc.RootElement.GetProperty("data").GetString() ?? ""; + Assert(data.Contains("disabled", StringComparison.OrdinalIgnoreCase), "Expected disabled provider message for ai.summarize_all."); + } + + static async Task TestEntryAiChatDisabledAsync() + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "ai.chat", + payload = new + { + prompt = "hello cloud" + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for disabled ai.chat."); + var data = doc.RootElement.GetProperty("data").GetString() ?? ""; + Assert(data.Contains("disabled", StringComparison.OrdinalIgnoreCase), "Expected disabled provider message for ai.chat."); + } + + static async Task TestEntryAiEmbedDisabledAsync() + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "ai.embed", + payload = new + { + content = "embedding source text" + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for disabled ai.embed."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.ValueKind == JsonValueKind.Array, "Expected ai.embed response to be a JSON array."); + Assert(data.GetArrayLength() == 0, "Expected disabled ai.embed to return an empty vector."); + } + + static async Task TestEntrySpeechDevicesListDisabledAsync() + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "speech.devices.list", + payload = new { } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for speech.devices.list when disabled."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.ValueKind == JsonValueKind.Object, "Expected speech.devices.list data to be an object."); + } + + static async Task TestEntrySpeechTranscribeDisabledAsync() + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "speech.transcribe", + payload = new + { + text = "fixture transcript", + engine = "whisper" + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for speech.transcribe when disabled."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.ValueKind == JsonValueKind.Object, "Expected speech.transcribe data to be an object."); + var warning = data.TryGetProperty("Warning", out var warningNode) ? warningNode.GetString() ?? "" : ""; + Assert(warning.Contains("disabled", StringComparison.OrdinalIgnoreCase), "Expected disabled speech warning."); + } + + static async Task TestPythonSidecarAiServiceJsonLineAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-ai-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + var scriptPath = Path.Combine(root, "fake_ai_sidecar.py"); + File.WriteAllText(scriptPath, """ +import json, sys +request = json.loads(sys.stdin.readline()) +action = request.get("action", "") +print("DEBUG prelude") +if action == "health": + print(json.dumps({"ok": True, "data": {"provider": "python-sidecar", "healthy": True, "message": "ok"}})) +elif action == "summarize_entry": + payload = request.get("payload") or {} + print(json.dumps({"ok": True, "data": "ENTRY::" + str(payload.get("content", ""))})) +elif action == "summarize_all": + payload = request.get("payload") or {} + entries = payload.get("entries") or [] + print(json.dumps({"ok": True, "data": "ALL::" + str(len(entries))})) +elif action == "chat": + payload = request.get("payload") or {} + print(json.dumps({"ok": True, "data": "CHAT::" + str(payload.get("prompt", ""))})) +elif action == "embed": + payload = request.get("payload") or {} + text = str(payload.get("content", "")) + print(json.dumps({"ok": True, "data": [float(len(text)), 2.5, -1.0]})) +else: + print(json.dumps({"ok": False, "error": "unknown action"})) +"""); + + try + { + var config = BuildAiConfig(scriptPath, timeoutMs: 4000); + IAiService service = new PythonSidecarAiService(config); + + var health = await service.HealthAsync(); + Assert(health.Enabled, "Expected enabled=true for python-sidecar health."); + Assert(health.Healthy, "Expected healthy=true from fake sidecar health."); + + var one = await service.SummarizeEntryAsync("hello"); + Assert(one == "ENTRY::hello", "Unexpected summarize_entry response."); + + var all = await service.SummarizeAllAsync(["a", "b", "c"]); + Assert(all == "ALL::3", "Unexpected summarize_all response."); + + var chat = await service.ChatAsync("hello"); + Assert(chat == "CHAT::hello", "Unexpected chat response."); + + var vector = await service.EmbedAsync("hello"); + Assert(vector.Count == 3, "Unexpected embed vector length."); + Assert(Math.Abs(vector[0] - 5d) < 0.0001d, "Unexpected embed vector first value."); + Assert(Math.Abs(vector[1] - 2.5d) < 0.0001d, "Unexpected embed vector second value."); + Assert(Math.Abs(vector[2] + 1.0d) < 0.0001d, "Unexpected embed vector third value."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestPythonSidecarAiServiceErrorAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-ai-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + var scriptPath = Path.Combine(root, "fake_ai_sidecar_error.py"); + File.WriteAllText(scriptPath, """ +import json, sys +_ = json.loads(sys.stdin.readline()) +print(json.dumps({"ok": False, "error": "simulated failure"})) +"""); + + try + { + var config = BuildAiConfig(scriptPath, timeoutMs: 4000); + IAiService service = new PythonSidecarAiService(config); + + try + { + _ = await service.SummarizeEntryAsync("hello"); + } + catch (InvalidOperationException ex) when (ex.Message.Contains("simulated failure", StringComparison.OrdinalIgnoreCase)) + { + return; + } + + throw new InvalidOperationException("Expected summarize_entry to surface sidecar error."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestPythonSidecarSpeechServiceNoDevicesAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-speech-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + var scriptPath = Path.Combine(root, "fake_speech_sidecar_nodes.py"); + File.WriteAllText(scriptPath, """ +import json, sys +request = json.loads(sys.stdin.readline()) +action = request.get("action", "") +if action == "speech.devices.list": + print(json.dumps({"ok": True, "data": {"devices": [], "warning": "no devices"}})) +elif action == "speech.transcribe": + payload = request.get("payload") or {} + print(json.dumps({"ok": True, "data": {"text": payload.get("text", ""), "engine": payload.get("engine", "whisper")}})) +else: + print(json.dumps({"ok": False, "error": "unknown action"})) +"""); + + try + { + var config = BuildAiConfig(scriptPath, timeoutMs: 4000); + ISpeechBridgeService service = new PythonSidecarSpeechService(config); + + var devices = await service.ListDevicesAsync(); + Assert(devices.Devices.Count == 0, "Expected empty devices list."); + Assert((devices.Warning ?? "").Contains("no devices", StringComparison.OrdinalIgnoreCase), "Expected no-devices warning."); + + var transcript = await service.TranscribeAsync(new SpeechTranscribeRequestDto(Text: "fixture text", Engine: "whisper")); + Assert(transcript.Text == "fixture text", "Expected passthrough transcript text."); + Assert(transcript.Engine == "whisper", "Expected passthrough transcript engine."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestPythonSidecarSpeechServiceErrorAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-speech-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + var scriptPath = Path.Combine(root, "fake_speech_sidecar_error.py"); + File.WriteAllText(scriptPath, """ +import json, sys +request = json.loads(sys.stdin.readline()) +action = request.get("action", "") +if action == "speech.transcribe": + print(json.dumps({"ok": False, "error": "engine unavailable"})) +else: + print(json.dumps({"ok": True, "data": {"devices": []}})) +"""); + + try + { + var config = BuildAiConfig(scriptPath, timeoutMs: 4000); + ISpeechBridgeService service = new PythonSidecarSpeechService(config); + + try + { + _ = await service.TranscribeAsync(new SpeechTranscribeRequestDto(Text: "fixture", Engine: "faster-whisper")); + } + catch (InvalidOperationException ex) when (ex.Message.Contains("engine unavailable", StringComparison.OrdinalIgnoreCase)) + { + return; + } + + throw new InvalidOperationException("Expected speech transcribe to surface sidecar engine error."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestPythonSidecarSpeechServiceTimeoutAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-speech-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + var scriptPath = Path.Combine(root, "fake_speech_sidecar_timeout.py"); + File.WriteAllText(scriptPath, """ +import json, sys, time +request = json.loads(sys.stdin.readline()) +payload = request.get("payload") or {} +sleep_ms = int(payload.get("simulate_delay_ms") or 0) +time.sleep(max(0, sleep_ms) / 1000.0) +print(json.dumps({"ok": True, "data": {"text": "", "engine": "whisper"}})) +"""); + + try + { + var config = BuildAiConfig(scriptPath, timeoutMs: 100); + ISpeechBridgeService service = new PythonSidecarSpeechService(config); + + try + { + _ = await service.TranscribeAsync(new SpeechTranscribeRequestDto(Text: "fixture", SimulateDelayMs: 500)); + } + catch (TimeoutException) + { + return; + } + + throw new InvalidOperationException("Expected speech transcribe timeout path."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } +} + diff --git a/Journal.SmokeTests/Program.DatabaseConfigTests.cs b/Journal.SmokeTests/Program.DatabaseConfigTests.cs new file mode 100644 index 0000000..2b51b89 --- /dev/null +++ b/Journal.SmokeTests/Program.DatabaseConfigTests.cs @@ -0,0 +1,249 @@ +internal static partial class Program +{ + static Task TestDatabaseKeyDerivationMatchesPythonAsync() + { + var service = NewDatabaseService(); + var keyHex = Convert.ToHexString(service.DeriveDatabaseKey("vault-pass-123")).ToLowerInvariant(); + var expected = "6a9de08e13357aa8f14e7eb0ccde119e7b4d277c60aaaca6493d9a1e1eaa5b04"; + Assert(keyHex == expected, "Database key derivation should match Python PBKDF2 fixture."); + return Task.CompletedTask; + } + + static Task TestDatabaseSchemaParityAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-db-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + var service = NewDatabaseService(); + var schemaPath = service.WriteSchemaBootstrap(root); + var statements = service.GetSchemaStatements(); + var tableNames = new HashSet<string>(statements.Keys, StringComparer.OrdinalIgnoreCase); + + Assert(tableNames.Contains("entries"), "Schema should contain entries table."); + Assert(tableNames.Contains("sections"), "Schema should contain sections table."); + Assert(tableNames.Contains("fragments"), "Schema should contain fragments table."); + Assert(tableNames.Contains("tags"), "Schema should contain tags table."); + Assert(tableNames.Contains("fragment_tags"), "Schema should contain fragment_tags table."); + + Assert(File.Exists(schemaPath), "Schema bootstrap file should be written."); + var fragmentTagsSql = statements["fragment_tags"]; + Assert(fragmentTagsSql.Contains("PRIMARY KEY (fragment_id, tag_id)", StringComparison.OrdinalIgnoreCase), "fragment_tags should enforce composite primary key parity."); + Assert(fragmentTagsSql.Contains("FOREIGN KEY (fragment_id) REFERENCES fragments (id)", StringComparison.OrdinalIgnoreCase), "fragment_tags should contain fragment foreign key parity."); + Assert(fragmentTagsSql.Contains("FOREIGN KEY (tag_id) REFERENCES tags (id)", StringComparison.OrdinalIgnoreCase), "fragment_tags should contain tag foreign key parity."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static async Task TestEntryDatabaseStatusAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-db-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "db.status", + payload = new + { + password = "vault-pass-123", + dataDirectory = root + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for db.status."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.TryGetProperty("DatabasePath", out var databasePath), "Expected DatabasePath in db.status payload."); + Assert(databasePath.ValueKind == JsonValueKind.String && !string.IsNullOrWhiteSpace(databasePath.GetString()), "Expected non-empty DatabasePath."); + Assert(data.TryGetProperty("KeyDerivation", out var keyDerivation), "Expected KeyDerivation in db.status payload."); + Assert(string.Equals(keyDerivation.GetString(), "PBKDF2-HMAC-SHA256", StringComparison.Ordinal), "Expected PBKDF2-HMAC-SHA256 key derivation."); + Assert(data.TryGetProperty("SchemaTables", out var schemaTables), "Expected SchemaTables list in db.status payload."); + Assert(schemaTables.ValueKind == JsonValueKind.Array && schemaTables.GetArrayLength() >= 5, "Expected schema table list in db.status payload."); + Assert(data.TryGetProperty("SchemaBootstrapPath", out var schemaBootstrapPath), "Expected SchemaBootstrapPath in db.status payload."); + Assert(schemaBootstrapPath.ValueKind == JsonValueKind.String && File.Exists(schemaBootstrapPath.GetString()), "Expected db.status to emit existing schema bootstrap file path."); + Assert(data.TryGetProperty("RuntimeReady", out var runtimeReady), "Expected RuntimeReady in db.status payload."); + Assert(runtimeReady.ValueKind == JsonValueKind.True, "Expected SQLCipher runtime-ready status in db.status payload."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntryDatabaseInitializeSchemaAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-db-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "db.initialize_schema", + payload = new + { + password = "vault-pass-123", + dataDirectory = root + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for db.initialize_schema."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.TryGetProperty("schemaPath", out var schemaPath), "Expected schemaPath in db.initialize_schema response."); + Assert(schemaPath.ValueKind == JsonValueKind.String, "Expected string schemaPath value."); + var resolvedPath = schemaPath.GetString() ?? ""; + Assert(File.Exists(resolvedPath), "db.initialize_schema should write schema bootstrap file."); + var schemaText = File.ReadAllText(resolvedPath); + Assert(schemaText.Contains("CREATE TABLE IF NOT EXISTS entries", StringComparison.OrdinalIgnoreCase), "schema bootstrap should include entries table."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntryDatabaseHydrateWorkspaceAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-db-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + File.WriteAllText(Path.Combine(root, "2026-02-20.md"), "one"); + File.WriteAllText(Path.Combine(root, "2026-02-21.md"), "two"); + + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "db.hydrate_workspace", + payload = new + { + password = "vault-pass-123", + dataDirectory = root + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for db.hydrate_workspace."); + var data = doc.RootElement.GetProperty("data"); + + Assert(data.TryGetProperty("DatabasePath", out var databasePath), "Expected DatabasePath in hydrate payload."); + Assert(databasePath.ValueKind == JsonValueKind.String && !string.IsNullOrWhiteSpace(databasePath.GetString()), "Expected non-empty DatabasePath."); + Assert(data.TryGetProperty("SchemaBootstrapPath", out var schemaPath), "Expected SchemaBootstrapPath in hydrate payload."); + Assert(schemaPath.ValueKind == JsonValueKind.String && File.Exists(schemaPath.GetString()), "Expected hydrate to write schema bootstrap file."); + Assert(data.TryGetProperty("EntryFilesProcessed", out var filesProcessed), "Expected EntryFilesProcessed in hydrate payload."); + Assert(filesProcessed.ValueKind == JsonValueKind.Number && filesProcessed.GetInt32() == 2, "Expected hydrate to count markdown files in workspace."); + Assert(data.TryGetProperty("RuntimeReady", out var runtimeReady), "Expected RuntimeReady in hydrate payload."); + Assert(runtimeReady.ValueKind == JsonValueKind.True, "Expected RuntimeReady=true when SQLCipher runtime hydration succeeds."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static Task TestConfigServiceParityKeysAsync() + { + IJournalConfigService config = new JournalConfigService(); + var current = config.Current; + + Assert(!string.IsNullOrWhiteSpace(current.ProjectRoot), "Config ProjectRoot should not be empty."); + Assert(!string.IsNullOrWhiteSpace(current.AppDirectory), "Config AppDirectory should not be empty."); + Assert(!string.IsNullOrWhiteSpace(current.DataDirectory), "Config DataDirectory should not be empty."); + Assert(!string.IsNullOrWhiteSpace(current.VaultDirectory), "Config VaultDirectory should not be empty."); + Assert(current.MonthlyVaultFormat == "%Y-%m.vault", "Config MonthlyVaultFormat should match Python format token."); + + Assert(current.LlamaCppUrl == "http://127.0.0.1:8085/v1/completions", "Config LlamaCppUrl default mismatch."); + Assert(current.LlamaCppModel == "qwen/qwen3-4b", "Config LlamaCppModel default mismatch."); + Assert(current.EmbeddingApiUrl == "http://127.0.0.1:8086/v1/embeddings", "Config EmbeddingApiUrl default mismatch."); + Assert(current.SpeechRecognitionEngine == "whisper", "Config SpeechRecognitionEngine default mismatch."); + Assert(current.WhisperModelSize == "base", "Config WhisperModelSize default mismatch."); + Assert(current.AiProvider == "none", "Config AiProvider default mismatch."); + Assert(current.PythonExecutable == "python", "Config PythonExecutable default mismatch."); + Assert(current.AiSidecarTimeoutMs == 45000, "Config AiSidecarTimeoutMs default mismatch."); + Assert(current.PythonAiSidecarPath.EndsWith(Path.Combine("journal", "ai", "sidecar.py"), StringComparison.OrdinalIgnoreCase), "Config PythonAiSidecarPath default mismatch."); + + return Task.CompletedTask; + } + + static async Task TestEntryConfigGetAsync() + { + var entry = NewEntry(); + var response = await entry.HandleCommandAsync("""{"action":"config.get"}"""); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for config.get."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.ValueKind == JsonValueKind.Object, "Expected object payload for config.get."); + + Assert(data.TryGetProperty("DataDirectory", out var dataDirectory), "Expected DataDirectory in config payload."); + Assert(dataDirectory.ValueKind == JsonValueKind.String && !string.IsNullOrWhiteSpace(dataDirectory.GetString()), "Expected non-empty DataDirectory value."); + Assert(data.TryGetProperty("MonthlyVaultFormat", out var monthlyVaultFormat), "Expected MonthlyVaultFormat in config payload."); + Assert(monthlyVaultFormat.GetString() == "%Y-%m.vault", "Expected Python-compatible MonthlyVaultFormat value."); + Assert(data.TryGetProperty("LlamaCppUrl", out _), "Expected LlamaCppUrl in config payload."); + Assert(data.TryGetProperty("SpeechRecognitionEngine", out _), "Expected SpeechRecognitionEngine in config payload."); + } + + static Task TestLogRedactorScrubsSensitiveFieldsAsync() + { + var payload = JsonSerializer.SerializeToElement(new + { + password = "vault-pass-123", + content = "private journal body", + prompt = "private ai prompt", + nested = new + { + token = "abc123" + } + }); + + var redacted = LogRedactor.RedactPayload(payload); + var serialized = JsonSerializer.Serialize(redacted); + + Assert(!serialized.Contains("vault-pass-123", StringComparison.Ordinal), "Password should be redacted."); + Assert(!serialized.Contains("private journal body", StringComparison.Ordinal), "Entry content should be redacted."); + Assert(!serialized.Contains("private ai prompt", StringComparison.Ordinal), "Prompt should be redacted."); + Assert(!serialized.Contains("abc123", StringComparison.Ordinal), "Nested token should be redacted."); + Assert(serialized.Contains("[REDACTED]", StringComparison.Ordinal), "Redacted marker should be present."); + + return Task.CompletedTask; + } + + static Task TestLogRedactorPreservesNonSensitiveFieldsAsync() + { + var payload = JsonSerializer.SerializeToElement(new + { + action = "entries.save", + mode = "Daily", + filePath = "E:/journal/2026-02-24.md" + }); + + var redacted = LogRedactor.RedactPayload(payload); + var serialized = JsonSerializer.Serialize(redacted); + + Assert(serialized.Contains("entries.save", StringComparison.Ordinal), "Non-sensitive action field should be preserved."); + Assert(serialized.Contains("Daily", StringComparison.Ordinal), "Non-sensitive mode field should be preserved."); + Assert(serialized.Contains("2026-02-24.md", StringComparison.Ordinal), "Non-sensitive path field should be preserved."); + + return Task.CompletedTask; + } +} + diff --git a/Journal.SmokeTests/Program.EntryTests.cs b/Journal.SmokeTests/Program.EntryTests.cs new file mode 100644 index 0000000..ad8da7d --- /dev/null +++ b/Journal.SmokeTests/Program.EntryTests.cs @@ -0,0 +1,657 @@ +internal static partial class Program +{ + static async Task TestEntryUnknownActionAsync() + { + var entry = NewEntry(); + var response = await entry.HandleCommandAsync("""{"action":"unknown.action"}"""); + using var doc = JsonDocument.Parse(response); + + Assert(!doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=false."); + Assert(doc.RootElement.GetProperty("error").GetString()!.Contains("Unknown action"), "Expected unknown action error."); + } + + static async Task TestEntryInvalidJsonAsync() + { + var entry = NewEntry(); + var response = await entry.HandleCommandAsync("{\"action\":\"fragments.list\""); + using var doc = JsonDocument.Parse(response); + + Assert(!doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=false."); + Assert(doc.RootElement.GetProperty("error").GetString()!.Contains("Invalid command JSON"), "Expected invalid JSON error."); + } + + static async Task TestEntryGetMissingReturnsNullDataAsync() + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "fragments.get", + id = Guid.NewGuid().ToString(), + }); + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true."); + Assert(doc.RootElement.GetProperty("data").ValueKind == JsonValueKind.Null, "Expected data=null for missing fragment."); + } + + static async Task TestEntryCreateMissingPayloadAsync() + { + var entry = NewEntry(); + var response = await entry.HandleCommandAsync("""{"action":"fragments.create"}"""); + using var doc = JsonDocument.Parse(response); + + Assert(!doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=false."); + Assert(doc.RootElement.GetProperty("error").GetString()!.Contains("payload", StringComparison.OrdinalIgnoreCase), "Expected payload validation error."); + } + + static async Task TestEntryEntriesSaveMergeAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-entry-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + var filePath = Path.Combine(root, "2026-02-22.md"); + File.WriteAllText(filePath, """ +Date: 2026-02-22 +## Summary +old summary text +"""); + + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "entries.save", + payload = new + { + filePath, + mode = "Daily", + content = """ +Date: 2026-02-22 +## Summary +new summary text +## Reflection +new reflection text +""" + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for entries.save."); + + var saved = File.ReadAllText(filePath); + Assert(saved.Contains("new summary text", StringComparison.Ordinal), "Expected merged file to contain new summary text."); + Assert(!saved.Contains("old summary text", StringComparison.Ordinal), "Expected merged file to replace old summary section."); + Assert(saved.Contains("new reflection text", StringComparison.Ordinal), "Expected merged file to contain new reflection section."); + + var fragmentSaveRequest = JsonSerializer.Serialize(new + { + action = "entries.save", + payload = new + { + filePath, + mode = "Fragment", + content = "!NOTE\nfragment append text" + } + }); + + var fragmentResponse = await entry.HandleCommandAsync(fragmentSaveRequest); + using var fragmentDoc = JsonDocument.Parse(fragmentResponse); + Assert(fragmentDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for entries.save fragment mode."); + var appended = File.ReadAllText(filePath); + Assert(appended.Contains("fragment append text", StringComparison.Ordinal), "Expected fragment append text in saved file."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntryEntriesLoadAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-entry-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + var filePath = Path.Combine(root, "2026-02-22.md"); + var content = """ +Date: 2026-02-22 +## Summary +hello world +"""; + File.WriteAllText(filePath, content); + + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "entries.load", + payload = new + { + filePath + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for entries.load."); + + var data = doc.RootElement.GetProperty("data"); + var entryDto = data.GetProperty("Entry"); + Assert(entryDto.GetProperty("Date").GetString() == "2026-02-22", "Expected parsed date from entries.load."); + Assert(entryDto.GetProperty("RawContent").GetString() == content, "Expected raw content from entries.load."); + Assert(data.GetProperty("FileName").GetString() == "2026-02-22.md", "Expected file name from entries.load."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntryEntriesListAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-entry-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + File.WriteAllText(Path.Combine(root, "2026-02-03.md"), "c"); + File.WriteAllText(Path.Combine(root, "2026-02-01.md"), "a"); + File.WriteAllText(Path.Combine(root, "ignore.txt"), "x"); + + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "entries.list", + payload = new + { + dataDirectory = root + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for entries.list."); + + var data = doc.RootElement.GetProperty("data"); + Assert(data.ValueKind == JsonValueKind.Array, "Expected entries.list data array."); + Assert(data.GetArrayLength() == 2, "Expected entries.list to return only markdown files."); + Assert(data[0].GetProperty("FileName").GetString() == "2026-02-01.md", "Expected entries.list sort order by file name."); + Assert(data[1].GetProperty("FileName").GetString() == "2026-02-03.md", "Expected entries.list sort order by file name."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntryTemplatesCrudExcludesFromEntriesListAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-template-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + File.WriteAllText(Path.Combine(root, "2026-02-03.md"), "daily entry"); + + var entry = NewEntry(); + var saveRequest = JsonSerializer.Serialize(new + { + action = "templates.save", + payload = new + { + name = "Weekly Review", + content = "# Weekly Review\n\n## Wins\n- one", + dataDirectory = root + } + }); + var saveResponse = await entry.HandleCommandAsync(saveRequest); + using var saveDoc = JsonDocument.Parse(saveResponse); + Assert(saveDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for templates.save."); + var templatePath = saveDoc.RootElement.GetProperty("data").GetProperty("FilePath").GetString() ?? ""; + Assert(templatePath.EndsWith(".template.md", StringComparison.OrdinalIgnoreCase), "Template file should end with .template.md."); + Assert(File.Exists(templatePath), "Template file should exist."); + + var listTemplatesRequest = JsonSerializer.Serialize(new + { + action = "templates.list", + payload = new + { + dataDirectory = root + } + }); + var listTemplatesResponse = await entry.HandleCommandAsync(listTemplatesRequest); + using var listTemplatesDoc = JsonDocument.Parse(listTemplatesResponse); + Assert(listTemplatesDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for templates.list."); + var templateItems = listTemplatesDoc.RootElement.GetProperty("data"); + Assert(templateItems.GetArrayLength() == 1, "Expected one template in templates.list."); + Assert(templateItems[0].GetProperty("FileName").GetString() == "Weekly Review.template.md", "Template file name mismatch."); + + var listEntriesRequest = JsonSerializer.Serialize(new + { + action = "entries.list", + payload = new + { + dataDirectory = root + } + }); + var listEntriesResponse = await entry.HandleCommandAsync(listEntriesRequest); + using var listEntriesDoc = JsonDocument.Parse(listEntriesResponse); + Assert(listEntriesDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for entries.list."); + var entryItems = listEntriesDoc.RootElement.GetProperty("data"); + Assert(entryItems.GetArrayLength() == 1, "Expected entries.list to exclude template files."); + Assert(entryItems[0].GetProperty("FileName").GetString() == "2026-02-03.md", "Expected only daily entry file in entries.list."); + + var loadTemplateRequest = JsonSerializer.Serialize(new + { + action = "templates.load", + payload = new + { + filePath = templatePath + } + }); + var loadTemplateResponse = await entry.HandleCommandAsync(loadTemplateRequest); + using var loadTemplateDoc = JsonDocument.Parse(loadTemplateResponse); + Assert(loadTemplateDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for templates.load."); + var content = loadTemplateDoc.RootElement.GetProperty("data").GetProperty("Content").GetString() ?? ""; + Assert(content.Contains("## Wins", StringComparison.Ordinal), "Expected template content in templates.load result."); + + var deleteTemplateRequest = JsonSerializer.Serialize(new + { + action = "templates.delete", + payload = new + { + filePath = templatePath + } + }); + var deleteTemplateResponse = await entry.HandleCommandAsync(deleteTemplateRequest); + using var deleteTemplateDoc = JsonDocument.Parse(deleteTemplateResponse); + Assert(deleteTemplateDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for templates.delete."); + Assert(deleteTemplateDoc.RootElement.GetProperty("data").GetBoolean(), "Expected templates.delete to return true."); + Assert(!File.Exists(templatePath), "Template file should be deleted."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntrySearchEntriesMatchesRawContentAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-search-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + File.WriteAllText(Path.Combine(root, "2026-02-01.md"), "## Summary\nAlpha line\ncommon token"); + File.WriteAllText(Path.Combine(root, "2026-02-02.md"), "## Summary\nbeta line\nCOMMON token"); + File.WriteAllText(Path.Combine(root, "2026-02-03.md"), "## Summary\ngamma only"); + + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "search.entries", + payload = new + { + dataDirectory = root, + query = "common token", + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for search.entries."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.ValueKind == JsonValueKind.Array, "Expected data array from search.entries."); + Assert(data.GetArrayLength() == 2, "Expected two entries matching query across raw content."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntrySearchEntriesWithoutQueryReturnsAllAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-search-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + File.WriteAllText(Path.Combine(root, "2026-02-01.md"), "one"); + File.WriteAllText(Path.Combine(root, "2026-02-02.md"), "two"); + File.WriteAllText(Path.Combine(root, "ignore.txt"), "not markdown"); + + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "search.entries", + payload = new + { + dataDirectory = root, + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for search.entries without query."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.ValueKind == JsonValueKind.Array, "Expected data array from search.entries."); + Assert(data.GetArrayLength() == 2, "Expected all markdown files to be returned when query is omitted."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntrySearchEntriesDateRangeFilterAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-search-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + WriteSearchFixtureFiles(root); + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "search.entries", + payload = new + { + dataDirectory = root, + startDate = "2026-02-02", + endDate = "2026-02-28", + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for date-range filtered search."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.GetArrayLength() == 1, "Expected one result for filtered date range."); + Assert(data[0].GetProperty("FileName").GetString() == "2026-02-05.md", "Date-range result mismatch."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntrySearchEntriesSectionFilterAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-search-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + WriteSearchFixtureFiles(root); + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "search.entries", + payload = new + { + dataDirectory = root, + query = "focus area", + section = "Reflection", + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for section-scoped search."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.GetArrayLength() == 1, "Expected one section-scoped result."); + Assert(data[0].GetProperty("FileName").GetString() == "2026-02-01.md", "Section filter result mismatch."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntrySearchEntriesTagTypeFilterAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-search-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + WriteSearchFixtureFiles(root); + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "search.entries", + payload = new + { + dataDirectory = root, + tags = new[] { "stress" }, + types = new[] { "!TRIGGER" }, + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for fragment tag/type filtered search."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.GetArrayLength() == 1, "Expected one result for fragment tag/type filters."); + Assert(data[0].GetProperty("FileName").GetString() == "2026-02-01.md", "Tag/type filter result mismatch."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntrySearchEntriesCheckboxFilterAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-search-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + WriteSearchFixtureFiles(root); + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "search.entries", + payload = new + { + dataDirectory = root, + @checked = new[] { "med taken" }, + @unchecked = new[] { "drink water" }, + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for checkbox filtered search."); + var data = doc.RootElement.GetProperty("data"); + Assert(data.GetArrayLength() == 2, "Expected OR-style checkbox match across checked/unchecked filters."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntrySearchEntriesRejectsInvalidDateAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-search-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + WriteSearchFixtureFiles(root); + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "search.entries", + payload = new + { + dataDirectory = root, + startDate = "2026/02/01", + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(!doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=false for invalid date format."); + var error = doc.RootElement.GetProperty("error").GetString() ?? ""; + Assert(error.Contains("invalid startdate value", StringComparison.OrdinalIgnoreCase), "Expected invalid startDate error."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static Task TestSidecarSearchCliFilteredAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-sidecar-cli-smoke", Guid.NewGuid().ToString("N")); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(dataDir); + + try + { + WriteSearchFixtureFiles(dataDir); + var cli = new SidecarCli(new VaultStorageService(new VaultCryptoService()), new EntrySearchService(), new JournalConfigService()); + + var (exitCode, stdout, stderr) = CaptureConsole(() => cli.RunSearchCommand( + [ + "common", + "--data-dir", dataDir, + "--start-date", "2026-02-01", + "--end-date", "2026-02-28", + "--tag", "stress", + "--type", "!TRIGGER", + "--checked", "med taken", + "--section", "Summary" + ])); + + Assert(exitCode == 0, "Expected search CLI command to succeed."); + Assert(string.IsNullOrWhiteSpace(stderr), "Expected no stderr output for successful search CLI command."); + Assert(stdout.Contains("--- 2026-02-01 ---", StringComparison.Ordinal), "Expected matching entry header in search CLI output."); + Assert(!stdout.Contains("--- 2026-02-05 ---", StringComparison.Ordinal), "Unexpected non-matching entry in filtered search CLI output."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestSidecarSearchCliEmptyDataAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-sidecar-cli-smoke", Guid.NewGuid().ToString("N")); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(dataDir); + + try + { + var cli = new SidecarCli(new VaultStorageService(new VaultCryptoService()), new EntrySearchService(), new JournalConfigService()); + var (exitCode, stdout, _) = CaptureConsole(() => cli.RunSearchCommand(["--data-dir", dataDir])); + + Assert(exitCode == 0, "Expected search CLI command to return success for empty data directory."); + Assert(stdout.Contains("No decrypted journal entries found", StringComparison.OrdinalIgnoreCase), "Expected empty-data guidance message."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestEntrySavePayloadFileNameDeserializationAsync() + { + // Simulate what DeserializePayload does: parse JSON to JsonElement, then Deserialize<T> + var json = """{"content":"hello","mode":"Overwrite","fileName":"My Custom Name"}"""; + var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; + var element = JsonSerializer.Deserialize<JsonElement>(json); + var payload = element.Deserialize<EntrySavePayload>(options); + + Assert(payload is not null, "Payload should not be null."); + Assert(payload!.Content == "hello", "Content should be deserialized."); + Assert(payload.Mode == "Overwrite", "Mode should be deserialized."); + Assert(payload.FileName == "My Custom Name", "FileName should be deserialized from camelCase JSON via JsonElement."); + Assert(payload.FilePath is null, "FilePath should be null when not provided."); + + return Task.CompletedTask; + } + + static async Task TestEntrySaveWithFileNameAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-entry-smoke", Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(root); + + try + { + // Use EntryFileService directly to test the full save path with fileName + var service = new EntryFileService(new DiskEntryFileRepository()); + var payload = new EntrySavePayload( + Content: "# Custom Entry\n\nHello world", + FilePath: null, + Mode: "Overwrite", + FileName: "My Custom Name"); + + var result = service.SaveEntry(payload, root); + + var expectedPath = Path.GetFullPath(Path.Combine(root, "My Custom Name.md")); + Assert(result.FilePath == expectedPath, $"Expected path '{expectedPath}' but got '{result.FilePath}'."); + Assert(File.Exists(expectedPath), "Custom-named file should exist on disk."); + Assert(File.ReadAllText(expectedPath).Contains("Hello world"), "File content should match."); + + // Also test via Entry.HandleCommandAsync with JSON to verify full deserialization chain + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "entries.save", + payload = new + { + content = "# Second Entry", + mode = "Overwrite", + fileName = "Another Custom Name" + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for entries.save with fileName."); + + var savedFilePath = doc.RootElement.GetProperty("data").GetProperty("FilePath").GetString() ?? ""; + Assert(savedFilePath.Contains("Another Custom Name.md", StringComparison.OrdinalIgnoreCase), + $"Expected file path to contain 'Another Custom Name.md' but got '{savedFilePath}'."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } +} + diff --git a/Journal.SmokeTests/Program.FragmentTests.cs b/Journal.SmokeTests/Program.FragmentTests.cs new file mode 100644 index 0000000..c0e1f08 --- /dev/null +++ b/Journal.SmokeTests/Program.FragmentTests.cs @@ -0,0 +1,232 @@ +internal static partial class Program +{ + static Task TestCreateTrimsAsync() + { + var service = NewService(); + var created = service.Create(new CreateFragmentDto(" !TRIGGER ", " stomach drop ", [" stress ", "", " body "])); + + Assert(created.Type == "!TRIGGER", "Type should be trimmed."); + Assert(created.Description == "stomach drop", "Description should be trimmed."); + Assert(created.Tags.Count == 2, "Expected two normalized tags."); + Assert(created.Tags[0] == "stress" && created.Tags[1] == "body", "Tags should be trimmed and preserved."); + return Task.CompletedTask; + } + + static Task TestUpdateAcceptsTypeAsync() + { + var service = NewService(); + var created = service.Create(new CreateFragmentDto("!TRIGGER", "one")); + var ok = service.Update(created.Id, new UpdateFragmentDto(Type: " !FLASHBACK ", Description: " two ", Tags: [" memory "])); + + Assert(ok, "Expected update to succeed."); + var updated = service.GetById(created.Id); + Assert(updated is not null, "Updated fragment should exist."); + Assert(updated!.Type == "!FLASHBACK", "Updated type should be trimmed and stored."); + Assert(updated.Description == "two", "Updated description should be trimmed and stored."); + Assert(updated.Tags.Count == 1 && updated.Tags[0] == "memory", "Updated tags should be normalized."); + return Task.CompletedTask; + } + + static Task TestUpdateRejectsWhitespaceTypeAsync() + { + var service = NewService(); + var created = service.Create(new CreateFragmentDto("!TRIGGER", "desc")); + + try + { + _ = service.Update(created.Id, new UpdateFragmentDto(Type: " ")); + } + catch (ValidationException) + { + return Task.CompletedTask; + } + + throw new InvalidOperationException("Expected ValidationException for whitespace type update."); + } + + static Task TestFileRepositoryPersistsAsync() + { + var tempRoot = Path.Combine(Path.GetTempPath(), "journal-smoke", Guid.NewGuid().ToString("N")); + var dataDir = Path.Combine(tempRoot, "data"); + Directory.CreateDirectory(dataDir); + const string password = "smoke-test-password"; + + try + { + // Set up encrypted DB session + var configService = new JournalConfigService(); + var dbService = new JournalDatabaseService(configService); + + // First session: create a fragment + using var session1 = new DatabaseSessionService(dbService); + session1.SetPassword(password, dataDir); + var repo1 = new SqliteFragmentRepository(session1); + var service1 = new FragmentService(repo1); + var created = service1.Create(new CreateFragmentDto("!TRIGGER", "persist me", ["tag1"])); + + // Second session: verify persistence + using var session2 = new DatabaseSessionService(dbService); + session2.SetPassword(password, dataDir); + var repo2 = new SqliteFragmentRepository(session2); + var service2 = new FragmentService(repo2); + var loaded = service2.GetById(created.Id); + + Assert(loaded is not null, "Expected fragment to persist across repository instances."); + Assert(loaded!.Description == "persist me", "Persisted fragment description mismatch."); + Assert(loaded.Tags.Count == 1 && loaded.Tags[0] == "tag1", "Persisted tags mismatch."); + } + finally + { + if (Directory.Exists(tempRoot)) + Directory.Delete(tempRoot, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestJournalEntryModelAsync() + { + var fragment = new Fragment("!TRIGGER", "test fragment"); + var section = new ParsedSection( + "Summary", + content: ["line one", "- [x] completed thing"], + checkboxes: new Dictionary<string, bool> { ["completed thing"] = true }); + + var entry = new JournalEntry( + date: "2026-02-22", + fragments: [fragment], + rawContent: "raw markdown content", + sections: new Dictionary<string, ParsedSection> { ["Summary"] = section }); + + Assert(entry.Date == "2026-02-22", "JournalEntry date mismatch."); + Assert(entry.RawContent == "raw markdown content", "JournalEntry raw content mismatch."); + Assert(entry.Fragments.Count == 1, "JournalEntry fragment count mismatch."); + Assert(entry.Sections.Count == 1, "JournalEntry section count mismatch."); + Assert(entry.GetSection("Summary").Contains("line one"), "JournalEntry section content mismatch."); + Assert(entry.GetCheckboxState("Summary", "completed thing") is true, "JournalEntry checkbox state mismatch."); + Assert(entry.GetCheckboxState("Summary", "missing") is null, "JournalEntry checkbox should return null when missing."); + + return Task.CompletedTask; + } + + static Task TestMergeOverwritesMeaningfulSectionAsync() + { + var current = new JournalEntry( + date: "2026-02-22", + sections: new Dictionary<string, ParsedSection> + { + ["Summary"] = new ParsedSection("Summary", ["old content"]) + }); + + var incoming = new JournalEntry( + date: "2026-02-22", + sections: new Dictionary<string, ParsedSection> + { + ["Summary"] = new ParsedSection( + "Summary", + [" ", "new content line"], + new Dictionary<string, bool> { ["new check"] = true }), + ["Reflection"] = new ParsedSection("Reflection", ["reflective note"]) + }); + + current.MergeWith(incoming); + + Assert(current.GetSection("Summary").Contains("new content line"), "Meaningful section update should overwrite existing section."); + Assert(!current.GetSection("Summary").Contains("old content"), "Old section content should be replaced."); + Assert(current.GetCheckboxState("Summary", "new check") is true, "Overwritten section checkbox state should come from incoming section."); + Assert(current.GetSection("Reflection").Contains("reflective note"), "Meaningful new section should be added."); + + return Task.CompletedTask; + } + + static Task TestMergeIgnoresWhitespaceOnlySectionAsync() + { + var current = new JournalEntry( + date: "2026-02-22", + sections: new Dictionary<string, ParsedSection> + { + ["Summary"] = new ParsedSection("Summary", ["keep existing"]) + }); + + var incoming = new JournalEntry( + date: "2026-02-22", + sections: new Dictionary<string, ParsedSection> + { + ["Summary"] = new ParsedSection("Summary", [" ", "\t", ""]) + }); + + current.MergeWith(incoming); + + Assert(current.GetSection("Summary").Contains("keep existing"), "Whitespace-only section update should be ignored."); + + return Task.CompletedTask; + } + + static Task TestMergeAppendsNonDuplicateFragmentsAsync() + { + var current = new JournalEntry( + date: "2026-02-22", + fragments: + [ + new Fragment("!TRIGGER", "duplicate description") + ]); + + var incoming = new JournalEntry( + date: "2026-02-22", + fragments: + [ + new Fragment("!NOTE", "duplicate description"), + new Fragment("!NOTE", "new description") + ]); + + current.MergeWith(incoming); + + Assert(current.Fragments.Count == 2, "Expected only one new fragment to be appended."); + Assert(current.Fragments.Count(fragment => fragment.Description == "duplicate description") == 1, "Duplicate description should not be appended."); + Assert(current.Fragments.Any(fragment => fragment.Description == "new description"), "New fragment description should be appended."); + + return Task.CompletedTask; + } + + static Task TestToMarkdownCanonicalSectionOrderAsync() + { + var entry = new JournalEntry( + date: "2026-02-22", + sections: new Dictionary<string, ParsedSection> + { + ["Reflection"] = new ParsedSection("Reflection", ["reflection body"]), + ["Summary"] = new ParsedSection("Summary", ["summary body"]) + }); + + var markdown = entry.ToMarkdown(); + var summaryIdx = markdown.IndexOf("## Summary", StringComparison.Ordinal); + var reflectionIdx = markdown.IndexOf("## Reflection", StringComparison.Ordinal); + + Assert(summaryIdx >= 0, "Summary header should be emitted."); + Assert(reflectionIdx >= 0, "Reflection header should be emitted."); + Assert(summaryIdx < reflectionIdx, "Sections should be emitted in canonical order."); + + return Task.CompletedTask; + } + + static Task TestToMarkdownFragmentFormattingAsync() + { + var fragment = new Fragment("!TRIGGER", "fragment body") + { + Time = default, + Tags = ["stress", "body"] + }; + var entry = new JournalEntry( + date: "2026-02-22", + fragments: [fragment]); + + var markdown = entry.ToMarkdown(); + + Assert(markdown.Contains("# Fragments\n", StringComparison.Ordinal), "Fragments header should be present."); + Assert(markdown.Contains("!TRIGGER #stress #body\nfragment body\n", StringComparison.Ordinal), "Fragment block format should match parity shape."); + Assert(markdown.Contains("**Date:** 2026-02-22", StringComparison.Ordinal), "Date frontmatter line should be present."); + + return Task.CompletedTask; + } +} + diff --git a/Journal.SmokeTests/Program.ParserTests.cs b/Journal.SmokeTests/Program.ParserTests.cs new file mode 100644 index 0000000..df34165 --- /dev/null +++ b/Journal.SmokeTests/Program.ParserTests.cs @@ -0,0 +1,153 @@ +internal static partial class Program +{ + static Task TestParserExtractsBoldDateAsync() + { + var content = """ + --- + type: journal + --- + **Date:** 2026-02-22 + ## Summary + hello + """; + + var entry = JournalParser.ParseJournalContent(content, "2026-02-01"); + Assert(entry.Date == "2026-02-22", "Parser should read date from **Date:** marker."); + return Task.CompletedTask; + } + + static Task TestParserExtractsPlainDateAsync() + { + var content = """ + Date: 2026-02-23 + ## Summary + hello + """; + + var entry = JournalParser.ParseJournalContent(content, "2026-02-01"); + Assert(entry.Date == "2026-02-23", "Parser should read date from Date: marker."); + return Task.CompletedTask; + } + + static Task TestParserFallsBackToFileStemAsync() + { + var content = """ + ## Summary + no explicit date + """; + + var entry = JournalParser.ParseJournalContent(content, "2026-02-24"); + Assert(entry.Date == "2026-02-24", "Parser should fall back to file stem when no date marker is present."); + return Task.CompletedTask; + } + + static Task TestParserCapturesSectionsAsync() + { + var content = """ + Date: 2026-02-25 + ## Summary + line one + line two + ### Events / Triggers - Work + trigger line + ## reflection notes + anchor line + """; + + var entry = JournalParser.ParseJournalContent(content, "2026-02-01"); + + Assert(entry.Sections.ContainsKey("Summary"), "Parser should capture Summary section."); + Assert(entry.Sections.ContainsKey("Events / Triggers"), "Parser should capture Events / Triggers section."); + Assert(entry.Sections.ContainsKey("Reflection"), "Parser should match canonical section title by substring."); + Assert(entry.GetSection("Summary").Contains("line one"), "Summary section content mismatch."); + Assert(entry.GetSection("Events / Triggers").Contains("trigger line"), "Events / Triggers section content mismatch."); + Assert(entry.GetSection("Reflection").Contains("anchor line"), "Reflection section content mismatch."); + + return Task.CompletedTask; + } + + static Task TestParserIgnoresNonCanonicalHeadersAsync() + { + var content = """ + ## Summary + keep this + ## Totally Custom Header + should not be captured + ### Events / Triggers + keep this too + """; + + var entry = JournalParser.ParseJournalContent(content, "2026-02-01"); + + Assert(entry.GetSection("Summary").Contains("keep this"), "Summary section should be captured."); + Assert(!entry.GetSection("Summary").Contains("should not be captured"), "Non-canonical section content should not bleed into previous section."); + Assert(entry.GetSection("Events / Triggers").Contains("keep this too"), "Canonical section after custom header should be captured."); + + return Task.CompletedTask; + } + + static Task TestParserCapturesCheckboxStatesAsync() + { + var content = """ + ## Summary + - [x] took medication + - [ ] drank water + * [X] wrote reflection + ## Events / Triggers + - [ ] talked to manager + """; + + var entry = JournalParser.ParseJournalContent(content, "2026-02-01"); + + Assert(entry.GetCheckboxState("Summary", "took medication") is true, "Expected checked state for '- [x]' checkbox."); + Assert(entry.GetCheckboxState("Summary", "drank water") is false, "Expected unchecked state for '- [ ]' checkbox."); + Assert(entry.GetCheckboxState("Summary", "wrote reflection") is true, "Expected checked state for '* [X]' checkbox."); + Assert(entry.GetCheckboxState("Events / Triggers", "talked to manager") is false, "Expected unchecked state in Events / Triggers section."); + Assert(entry.GetCheckboxState("Summary", "missing item") is null, "Missing checkbox text should return null."); + + return Task.CompletedTask; + } + + static Task TestParserCapturesMultilineFragmentsAsync() + { + var content = """ + Date: 2026-02-26 + ## Summary + text + !TRIGGER @2026-02-26T10:15:00Z #stress #body + first line + second line + !NOTE #daily + short note + """; + + var entry = JournalParser.ParseJournalContent(content, "2026-02-01"); + + Assert(entry.Fragments.Count == 2, "Expected two parsed fragments."); + Assert(entry.Fragments[0].Type == "!TRIGGER", "First fragment type mismatch."); + Assert(entry.Fragments[0].Description == "first line\nsecond line", "First fragment multiline description mismatch."); + Assert(entry.Fragments[0].Tags.Count == 2, "First fragment tag count mismatch."); + Assert(entry.Fragments[0].Tags[0] == "stress" && entry.Fragments[0].Tags[1] == "body", "First fragment tags mismatch."); + Assert(entry.Fragments[1].Type == "!NOTE", "Second fragment type mismatch."); + Assert(entry.Fragments[1].Description == "short note", "Second fragment description mismatch."); + Assert(entry.Fragments[1].Tags.Count == 1 && entry.Fragments[1].Tags[0] == "daily", "Second fragment tags mismatch."); + + return Task.CompletedTask; + } + + static Task TestParserFragmentBoundaryBehaviorAsync() + { + var content = """ + !TRIGGER #a + line one + !NOTE this starts another fragment header + line two + """; + + var fragments = JournalParser.ParseFragments(content); + Assert(fragments.Count == 1, "Expected one parsed fragment because second boundary line is not a valid fragment header."); + Assert(fragments[0].Description == "line one", "First fragment boundary capture mismatch."); + return Task.CompletedTask; + } +} + diff --git a/Journal.SmokeTests/Program.Shared.cs b/Journal.SmokeTests/Program.Shared.cs new file mode 100644 index 0000000..21803d9 --- /dev/null +++ b/Journal.SmokeTests/Program.Shared.cs @@ -0,0 +1,169 @@ +internal static partial class Program +{ + static FragmentService NewService() + { + IFragmentRepository repo = new InMemoryFragmentRepository(); + return new FragmentService(repo); + } + + static Entry NewEntry() + { + var dbService = new JournalDatabaseService(new JournalConfigService()); + var session = new DatabaseSessionService(dbService); + return new Entry( + NewService(), + new EntrySearchService(), + new VaultStorageService(new VaultCryptoService()), + dbService, + session, + new JournalConfigService(), + new DisabledAiService("none"), + new DisabledSpeechBridgeService("none"), + new EntryFileService(new DiskEntryFileRepository()), + new ListService(new SqliteListRepository(session)), + new TodoService(new SqliteTodoRepository(session)), + new CommandLogger()); + } + + static IJournalDatabaseService NewDatabaseService() => new JournalDatabaseService(new JournalConfigService()); + + static Dictionary<string, string> ReadVaultEntryTexts(string vaultPath, string password) + { + var crypto = new VaultCryptoService(); + var encrypted = File.ReadAllBytes(vaultPath); + var zipBytes = crypto.DecryptData(encrypted, password); + + using var stream = new MemoryStream(zipBytes); + using var archive = new ZipArchive(stream, ZipArchiveMode.Read); + var result = new Dictionary<string, string>(StringComparer.Ordinal); + foreach (var entry in archive.Entries) + { + if (string.IsNullOrEmpty(entry.Name)) + continue; + + using var reader = new StreamReader(entry.Open()); + result[entry.Name] = reader.ReadToEnd(); + } + + return result; + } + + static byte[] CreateZipBytes(Dictionary<string, string> files) + { + using var stream = new MemoryStream(); + using (var archive = new ZipArchive(stream, ZipArchiveMode.Create, leaveOpen: true)) + { + foreach (var (name, content) in files) + { + var entry = archive.CreateEntry(name); + using var writer = new StreamWriter(entry.Open()); + writer.Write(content); + } + } + return stream.ToArray(); + } + + static void WriteSearchFixtureFiles(string root) + { + File.WriteAllText(Path.Combine(root, "2026-02-01.md"), """ +Date: 2026-02-01 +## Summary +Alpha common +## Reflection +focus area +- [x] med taken +!TRIGGER #stress +fragment one +"""); + + File.WriteAllText(Path.Combine(root, "2026-02-05.md"), """ +Date: 2026-02-05 +## Summary +Beta common +## Reflection +other notes +- [ ] drink water +!NOTE #daily +fragment two +"""); + + File.WriteAllText(Path.Combine(root, "2026-03-01.md"), """ +Date: 2026-03-01 +## Summary +Gamma unique +## Reflection +nothing related +!NOTE #other +fragment three +"""); + } + + static (int ExitCode, string Stdout, string Stderr) CaptureConsole(Func<int> action) + { + var originalOut = Console.Out; + var originalError = Console.Error; + using var stdout = new StringWriter(); + using var stderr = new StringWriter(); + + try + { + Console.SetOut(stdout); + Console.SetError(stderr); + var exitCode = action(); + return (exitCode, stdout.ToString(), stderr.ToString()); + } + finally + { + Console.SetOut(originalOut); + Console.SetError(originalError); + } + } + + static JournalConfig BuildAiConfig(string sidecarScriptPath, int timeoutMs) + { + var baseConfig = new JournalConfigService().Current; + var pythonExe = Environment.GetEnvironmentVariable("JOURNAL_PYTHON_EXE"); + if (string.IsNullOrWhiteSpace(pythonExe)) + pythonExe = "python"; + + return baseConfig with + { + AiProvider = "python-sidecar", + PythonExecutable = pythonExe, + PythonAiSidecarPath = sidecarScriptPath, + AiSidecarTimeoutMs = timeoutMs + }; + } + + static async Task<List<TransportFixture>> LoadTransportFixturesAsync() + { + var path = Path.Combine(AppContext.BaseDirectory, "Fixtures", "transport_cases.json"); + if (!File.Exists(path)) + throw new FileNotFoundException($"Transport fixture file not found: {path}"); + + var json = await File.ReadAllTextAsync(path); + return JsonSerializer.Deserialize<List<TransportFixture>>(json, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }) ?? []; + } + + static JsonValueKind ParseValueKind(string value) => value.Trim().ToLowerInvariant() switch + { + "array" => JsonValueKind.Array, + "object" => JsonValueKind.Object, + "null" => JsonValueKind.Null, + "string" => JsonValueKind.String, + "number" => JsonValueKind.Number, + "true" => JsonValueKind.True, + "false" => JsonValueKind.False, + _ => throw new InvalidOperationException($"Unsupported JsonValueKind '{value}' in transport fixture.") + }; + + static void Assert(bool condition, string message) + { + if (!condition) + throw new InvalidOperationException(message); + } +} + diff --git a/Journal.SmokeTests/Program.TransportTests.cs b/Journal.SmokeTests/Program.TransportTests.cs new file mode 100644 index 0000000..f24d5a7 --- /dev/null +++ b/Journal.SmokeTests/Program.TransportTests.cs @@ -0,0 +1,48 @@ +internal static partial class Program +{ + static async Task TestTransportFixturesAsync() + { + var fixtures = await LoadTransportFixturesAsync(); + Assert(fixtures.Count > 0, "Transport fixtures should not be empty."); + + foreach (var fixture in fixtures) + { + var entry = NewEntry(); + var response = await entry.HandleCommandAsync(fixture.Request); + + Assert(!response.Contains('\n') && !response.Contains('\r'), $"Fixture '{fixture.Name}' returned multiline output."); + + using var doc = JsonDocument.Parse(response); + var ok = doc.RootElement.GetProperty("ok").GetBoolean(); + Assert(ok == fixture.ExpectOk, $"Fixture '{fixture.Name}' expected ok={fixture.ExpectOk} but got ok={ok}."); + + if (fixture.ExpectOk) + { + Assert(doc.RootElement.TryGetProperty("data", out var data), $"Fixture '{fixture.Name}' expected data field."); + if (!string.IsNullOrWhiteSpace(fixture.DataKind)) + { + var expectedKind = ParseValueKind(fixture.DataKind!); + Assert(data.ValueKind == expectedKind, $"Fixture '{fixture.Name}' expected data kind {expectedKind} but got {data.ValueKind}."); + } + continue; + } + + Assert(doc.RootElement.TryGetProperty("error", out var error), $"Fixture '{fixture.Name}' expected error field."); + if (!string.IsNullOrWhiteSpace(fixture.ErrorContains)) + { + var message = error.GetString() ?? ""; + Assert(message.Contains(fixture.ErrorContains!, StringComparison.OrdinalIgnoreCase), $"Fixture '{fixture.Name}' expected error containing '{fixture.ErrorContains}'."); + } + } + } +} + +sealed class TransportFixture +{ + public string Name { get; init; } = ""; + public string Request { get; init; } = ""; + public bool ExpectOk { get; init; } + public string? DataKind { get; init; } + public string? ErrorContains { get; init; } +} + diff --git a/Journal.SmokeTests/Program.VaultTests.cs b/Journal.SmokeTests/Program.VaultTests.cs new file mode 100644 index 0000000..795250a --- /dev/null +++ b/Journal.SmokeTests/Program.VaultTests.cs @@ -0,0 +1,576 @@ +internal static partial class Program +{ + static Task TestVaultCryptoRoundtripAsync() + { + var crypto = new VaultCryptoService(); + var plaintext = "sample vault payload"; + var payload = crypto.EncryptData(System.Text.Encoding.UTF8.GetBytes(plaintext), "vault-pass-123"); + + Assert(payload.Length == VaultCryptoService.SaltSize + VaultCryptoService.NonceSize + VaultCryptoService.TagSize + plaintext.Length, "Vault payload length should match salt+nonce+tag+ciphertext layout."); + var decrypted = crypto.DecryptData(payload, "vault-pass-123"); + Assert(System.Text.Encoding.UTF8.GetString(decrypted) == plaintext, "Vault roundtrip decrypt should return original plaintext."); + + return Task.CompletedTask; + } + + static Task TestVaultCryptoDecryptsPythonFixtureAsync() + { + var crypto = new VaultCryptoService(); + + var payload = Convert.FromBase64String("AAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKC6AErhDEMERBl7OFkG4L4oZ2JZckS0VzhxaZoVLckF7VXE+NIYXILsJ8f1I="); + var expectedPlaintext = Convert.FromBase64String("dmF1bHQgcGF5bG9hZCBleGFtcGxlCmxpbmUy"); + var decrypted = crypto.DecryptData(payload, "vault-pass-123"); + + Assert(decrypted.SequenceEqual(expectedPlaintext), "C# decrypt should match Python-generated payload plaintext."); + + return Task.CompletedTask; + } + + static Task TestVaultKeyDerivationMatchesPythonAsync() + { + var crypto = new VaultCryptoService(); + var salt = Enumerable.Range(0, VaultCryptoService.SaltSize).Select(i => (byte)i).ToArray(); + var key = crypto.DeriveKey("vault-pass-123", salt); + var expectedKeyHex = "b29f523f28bf178f6815c6ca9ee2a588d79b3bd9a822c92a2f0dde5bc853bb52"; + var actualKeyHex = Convert.ToHexString(key).ToLowerInvariant(); + + Assert(actualKeyHex == expectedKeyHex, "Derived key should match Python PBKDF2 fixture key."); + + return Task.CompletedTask; + } + + static Task TestVaultMonthlyFilenameParityAsync() + { + IVaultStorageService vaultStorage = new VaultStorageService(new VaultCryptoService()); + var name = vaultStorage.GetMonthlyVaultFileName(new DateTime(2026, 2, 7)); + Assert(name == "2026-02.vault", "Monthly vault filename must match yyyy-MM.vault format."); + return Task.CompletedTask; + } + + static Task TestVaultLoadClearsAndExtractsAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + File.WriteAllText(Path.Combine(dataDir, "old_file.md"), "stale"); + + var zipBytes = CreateZipBytes(new Dictionary<string, string> + { + ["2026-02-01.md"] = "hello from vault" + }); + var crypto = new VaultCryptoService(); + var encrypted = crypto.EncryptData(zipBytes, "vault-pass-123"); + File.WriteAllBytes(Path.Combine(vaultDir, "2026-02.vault"), encrypted); + + IVaultStorageService storage = new VaultStorageService(crypto); + var ok = storage.LoadAllVaults("vault-pass-123", vaultDir, dataDir); + + Assert(ok, "Expected vault load success with correct password."); + Assert(!File.Exists(Path.Combine(dataDir, "old_file.md")), "Data directory should be cleared before extraction."); + var extractedPath = Path.Combine(dataDir, "2026-02-01.md"); + Assert(File.Exists(extractedPath), "Expected markdown file extracted from vault archive."); + Assert(File.ReadAllText(extractedPath) == "hello from vault", "Extracted file content mismatch."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestVaultLoadWrongPasswordPreservesVaultAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + var zipBytes = CreateZipBytes(new Dictionary<string, string> + { + ["2026-02-01.md"] = "hello from vault" + }); + var crypto = new VaultCryptoService(); + var encrypted = crypto.EncryptData(zipBytes, "vault-pass-123"); + var vaultPath = Path.Combine(vaultDir, "2026-02.vault"); + File.WriteAllBytes(vaultPath, encrypted); + var before = File.ReadAllBytes(vaultPath); + + IVaultStorageService storage = new VaultStorageService(crypto); + var ok = storage.LoadAllVaults("wrong-password", vaultDir, dataDir); + var after = File.ReadAllBytes(vaultPath); + + Assert(!ok, "Expected vault load failure with wrong password."); + Assert(before.SequenceEqual(after), "Vault file bytes should remain unchanged on wrong password."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestVaultLoadLegacyInitVaultHandlingAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + var legacyPath = Path.Combine(vaultDir, "_init_vault.vault"); + File.WriteAllBytes(legacyPath, [1, 2, 3, 4]); + + IVaultStorageService storage = new VaultStorageService(new VaultCryptoService()); + var ok = storage.LoadAllVaults("vault-pass-123", vaultDir, dataDir); + + Assert(ok, "Legacy-only vault directory should still be treated as successful load state."); + Assert(!File.Exists(legacyPath), "Legacy _init_vault.vault should be removed during load."); + Assert(Directory.Exists(dataDir), "Data directory should exist after load workflow."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestVaultCurrentMonthSaveOptimizedAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + File.WriteAllText(Path.Combine(dataDir, "2026-02-01.md"), "feb one"); + File.WriteAllText(Path.Combine(dataDir, "2026-02-18.md"), "feb two"); + File.WriteAllText(Path.Combine(dataDir, "2026-01-31.md"), "jan one"); + + IVaultStorageService storage = new VaultStorageService(new VaultCryptoService()); + var now = new DateTime(2026, 2, 22, 12, 0, 0, DateTimeKind.Utc); + + var firstSaved = storage.SaveCurrentMonthVault("vault-pass-123", vaultDir, dataDir, now); + Assert(firstSaved, "Expected first current-month save to write vault data."); + + var febVaultPath = Path.Combine(vaultDir, "2026-02.vault"); + var janVaultPath = Path.Combine(vaultDir, "2026-01.vault"); + Assert(File.Exists(febVaultPath), "Expected current-month vault file to be created."); + Assert(!File.Exists(janVaultPath), "Current-month save should not write non-current month vault files."); + + var entries = ReadVaultEntryTexts(febVaultPath, "vault-pass-123"); + Assert(entries.Count == 2, "Current-month vault should include only current-month markdown files."); + Assert(entries.ContainsKey("2026-02-01.md"), "Missing first current-month entry in vault archive."); + Assert(entries.ContainsKey("2026-02-18.md"), "Missing second current-month entry in vault archive."); + Assert(!entries.ContainsKey("2026-01-31.md"), "Current-month vault must not include previous-month files."); + + var beforeSkipBytes = File.ReadAllBytes(febVaultPath); + var secondSaved = storage.SaveCurrentMonthVault("vault-pass-123", vaultDir, dataDir, now); + var afterSkipBytes = File.ReadAllBytes(febVaultPath); + Assert(!secondSaved, "Expected unchanged current-month save to skip write."); + Assert(beforeSkipBytes.SequenceEqual(afterSkipBytes), "Vault bytes should remain unchanged when save is skipped."); + + File.WriteAllText(Path.Combine(dataDir, "2026-02-18.md"), "feb two changed"); + var thirdSaved = storage.SaveCurrentMonthVault("vault-pass-123", vaultDir, dataDir, now); + Assert(thirdSaved, "Expected save to run after current-month file change."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestVaultRebuildAllVaultsAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + File.WriteAllText(Path.Combine(dataDir, "2026-01-31.md"), "jan body"); + File.WriteAllText(Path.Combine(dataDir, "2026-02-01.md"), "feb body"); + File.WriteAllText(Path.Combine(dataDir, "not-a-journal.md"), "should be ignored"); + + IVaultStorageService storage = new VaultStorageService(new VaultCryptoService()); + storage.RebuildAllVaults("vault-pass-123", vaultDir, dataDir); + + var janVaultPath = Path.Combine(vaultDir, "2026-01.vault"); + var febVaultPath = Path.Combine(vaultDir, "2026-02.vault"); + Assert(File.Exists(janVaultPath), "Expected January vault from rebuild flow."); + Assert(File.Exists(febVaultPath), "Expected February vault from rebuild flow."); + + var janEntries = ReadVaultEntryTexts(janVaultPath, "vault-pass-123"); + var febEntries = ReadVaultEntryTexts(febVaultPath, "vault-pass-123"); + + Assert(janEntries.Count == 1 && janEntries.ContainsKey("2026-01-31.md"), "January vault contents mismatch."); + Assert(febEntries.Count == 1 && febEntries.ContainsKey("2026-02-01.md"), "February vault contents mismatch."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestVaultClearDataDirectoryAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(dataDir); + Directory.CreateDirectory(Path.Combine(dataDir, "nested")); + + try + { + File.WriteAllText(Path.Combine(dataDir, "2026-02-01.md"), "decrypted content"); + File.WriteAllText(Path.Combine(dataDir, "journal_cache.db"), "cache"); + File.WriteAllText(Path.Combine(dataDir, "nested", "tmp.txt"), "temp"); + + IVaultStorageService storage = new VaultStorageService(new VaultCryptoService()); + storage.ClearDataDirectory(dataDir); + + Assert(Directory.Exists(dataDir), "Data directory should be recreated after cleanup."); + Assert(!Directory.EnumerateFileSystemEntries(dataDir).Any(), "Data directory should be empty after cleanup."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static async Task TestEntryVaultLoadAllEmptyAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-sidecar-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + + try + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "vault.load_all", + payload = new + { + password = "vault-pass-123", + vaultDirectory = vaultDir, + dataDirectory = dataDir, + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for empty vault directory load."); + Assert(doc.RootElement.GetProperty("data").GetBoolean(), "Expected vault.load_all data=true for empty vault directory."); + Assert(Directory.Exists(dataDir), "Expected data directory to be created by load workflow."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntryVaultClearDataDirectoryAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-sidecar-smoke", Guid.NewGuid().ToString("N")); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(dataDir); + File.WriteAllText(Path.Combine(dataDir, "tmp.md"), "x"); + + try + { + var entry = NewEntry(); + var request = JsonSerializer.Serialize(new + { + action = "vault.clear_data_directory", + payload = new + { + dataDirectory = dataDir, + } + }); + + var response = await entry.HandleCommandAsync(request); + using var doc = JsonDocument.Parse(response); + + Assert(doc.RootElement.GetProperty("ok").GetBoolean(), "Expected ok=true for clear_data_directory."); + Assert(doc.RootElement.GetProperty("data").GetBoolean(), "Expected clear_data_directory result=true."); + Assert(Directory.Exists(dataDir), "Expected data directory to exist after clear."); + Assert(!Directory.EnumerateFileSystemEntries(dataDir).Any(), "Expected data directory to be empty after clear."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static Task TestSidecarVaultCliLoadAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-sidecar-cli-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + + try + { + var cli = new SidecarCli(new VaultStorageService(new VaultCryptoService()), new EntrySearchService(), new JournalConfigService()); + var exitCode = cli.RunVaultCommand(["load", "--password", "vault-pass-123", "--vault-dir", vaultDir, "--data-dir", dataDir]); + + Assert(exitCode == 0, "Expected vault load CLI command to succeed on empty vault directory."); + Assert(Directory.Exists(dataDir), "Expected data directory to be created by vault load CLI command."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestSidecarVaultCliSaveAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-sidecar-cli-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + File.WriteAllText(Path.Combine(dataDir, "2026-02-22.md"), "entry body"); + + var cli = new SidecarCli(new VaultStorageService(new VaultCryptoService()), new EntrySearchService(), new JournalConfigService()); + var exitCode = cli.RunVaultCommand(["save", "--password", "vault-pass-123", "--vault-dir", vaultDir, "--data-dir", dataDir]); + + Assert(exitCode == 0, "Expected vault save CLI command to succeed."); + Assert(File.Exists(Path.Combine(vaultDir, "2026-02.vault")), "Expected monthly vault file to be written by save CLI command."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static Task TestVaultCustomEntryRoundtripAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + // Create both date-named and custom-named entries + File.WriteAllText(Path.Combine(dataDir, "2026-02-01.md"), "date entry"); + File.WriteAllText(Path.Combine(dataDir, "My Custom Entry.md"), "custom entry body"); + File.WriteAllText(Path.Combine(dataDir, "Work Notes.md"), "work notes body"); + + // Rebuild vaults (simulates app close) + IVaultStorageService storage = new VaultStorageService(new VaultCryptoService()); + storage.RebuildAllVaults("vault-pass-123", vaultDir, dataDir); + + // Verify custom vault was created + var customVaultPath = Path.Combine(vaultDir, "_custom_entries.vault"); + Assert(File.Exists(customVaultPath), "Expected _custom_entries.vault to be created."); + Assert(File.Exists(Path.Combine(vaultDir, "2026-02.vault")), "Expected monthly vault for date entry."); + + // Clear data directory (simulates app close step 2) + storage.ClearDataDirectory(dataDir); + Assert(!Directory.EnumerateFileSystemEntries(dataDir).Any(), "Data directory should be empty after clear."); + + // Load vaults (simulates app restart) + var ok = storage.LoadAllVaults("vault-pass-123", vaultDir, dataDir); + Assert(ok, "Expected vault load to succeed."); + + // Verify all entries are restored + Assert(File.Exists(Path.Combine(dataDir, "2026-02-01.md")), "Date entry should be restored from vault."); + Assert(File.Exists(Path.Combine(dataDir, "My Custom Entry.md")), "Custom entry should be restored from vault."); + Assert(File.Exists(Path.Combine(dataDir, "Work Notes.md")), "Second custom entry should be restored from vault."); + Assert(File.ReadAllText(Path.Combine(dataDir, "My Custom Entry.md")) == "custom entry body", "Custom entry content mismatch."); + Assert(File.ReadAllText(Path.Combine(dataDir, "Work Notes.md")) == "work notes body", "Second custom entry content mismatch."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + + return Task.CompletedTask; + } + + static async Task TestEntryVaultLoadWrongPasswordKeepsSessionLockedAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-vault-smoke", Guid.NewGuid().ToString("N")); + var vaultDir = Path.Combine(root, "vault"); + var dataDir = Path.Combine(root, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + try + { + var zipBytes = CreateZipBytes(new Dictionary<string, string> + { + ["2026-02-01.md"] = "hello from vault" + }); + var crypto = new VaultCryptoService(); + var encrypted = crypto.EncryptData(zipBytes, "vault-pass-123"); + File.WriteAllBytes(Path.Combine(vaultDir, "2026-02.vault"), encrypted); + + var entry = NewEntry(); + + var loadRequest = JsonSerializer.Serialize(new + { + action = "vault.load_all", + payload = new + { + password = "wrong-password", + vaultDirectory = vaultDir, + dataDirectory = dataDir + } + }); + var loadResponse = await entry.HandleCommandAsync(loadRequest); + using var loadDoc = JsonDocument.Parse(loadResponse); + Assert(loadDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected vault.load_all response envelope to be ok=true."); + Assert(!loadDoc.RootElement.GetProperty("data").GetBoolean(), "Expected vault.load_all data=false with wrong password."); + + var listRequest = JsonSerializer.Serialize(new + { + action = "lists.list" + }); + var listResponse = await entry.HandleCommandAsync(listRequest); + using var listDoc = JsonDocument.Parse(listResponse); + Assert(!listDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected lists.list to fail while locked."); + var error = listDoc.RootElement.GetProperty("error").GetString() ?? ""; + Assert(error.Contains("database is locked", StringComparison.OrdinalIgnoreCase), "Expected locked-session error after failed vault.load_all."); + } + finally + { + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } + + static async Task TestEntryTemplateSaveAutoSyncsVaultAsync() + { + var root = Path.Combine(Path.GetTempPath(), "journal-entry-vault-sync-smoke", Guid.NewGuid().ToString("N")); + var projectRoot = Path.Combine(root, "project"); + var appDirectory = Path.Combine(projectRoot, "journal"); + var vaultDir = Path.Combine(appDirectory, "vault"); + var dataDir = Path.Combine(appDirectory, "data"); + Directory.CreateDirectory(vaultDir); + Directory.CreateDirectory(dataDir); + + var previousProjectRoot = Environment.GetEnvironmentVariable("JOURNAL_PROJECT_ROOT"); + var previousDataDir = Environment.GetEnvironmentVariable("JOURNAL_DATA_DIR"); + var previousVaultDir = Environment.GetEnvironmentVariable("JOURNAL_VAULT_DIR"); + Environment.SetEnvironmentVariable("JOURNAL_PROJECT_ROOT", projectRoot); + Environment.SetEnvironmentVariable("JOURNAL_DATA_DIR", dataDir); + Environment.SetEnvironmentVariable("JOURNAL_VAULT_DIR", vaultDir); + + try + { + var entry = NewEntry(); + var password = "vault-pass-123"; + + var unlockRequest = JsonSerializer.Serialize(new + { + action = "vault.load_all", + payload = new + { + password, + vaultDirectory = vaultDir, + dataDirectory = dataDir + } + }); + var unlockResponse = await entry.HandleCommandAsync(unlockRequest); + using var unlockDoc = JsonDocument.Parse(unlockResponse); + Assert(unlockDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected vault.load_all envelope to succeed."); + Assert(unlockDoc.RootElement.GetProperty("data").GetBoolean(), "Expected vault.load_all data=true for empty vault."); + + var saveTemplateRequest = JsonSerializer.Serialize(new + { + action = "templates.save", + payload = new + { + name = "Weekly Review", + content = "## Wins\n- shipped feature", + dataDirectory = dataDir + } + }); + var saveTemplateResponse = await entry.HandleCommandAsync(saveTemplateRequest); + using var saveTemplateDoc = JsonDocument.Parse(saveTemplateResponse); + Assert(saveTemplateDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected templates.save to succeed."); + + var customVaultPath = Path.Combine(vaultDir, "_custom_entries.vault"); + Assert(File.Exists(customVaultPath), "Expected template save to auto-sync custom entries vault."); + + var entries = ReadVaultEntryTexts(customVaultPath, password); + Assert(entries.ContainsKey("Weekly Review.template.md"), "Expected template file in custom vault archive."); + + var clearRequest = JsonSerializer.Serialize(new + { + action = "vault.clear_data_directory", + payload = new + { + dataDirectory = dataDir + } + }); + var clearResponse = await entry.HandleCommandAsync(clearRequest); + using var clearDoc = JsonDocument.Parse(clearResponse); + Assert(clearDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected vault.clear_data_directory to succeed."); + + var reloadResponse = await entry.HandleCommandAsync(unlockRequest); + using var reloadDoc = JsonDocument.Parse(reloadResponse); + Assert(reloadDoc.RootElement.GetProperty("ok").GetBoolean(), "Expected second vault.load_all envelope to succeed."); + Assert(reloadDoc.RootElement.GetProperty("data").GetBoolean(), "Expected second vault.load_all data=true."); + + var restoredTemplatePath = Path.Combine(dataDir, "Weekly Review.template.md"); + Assert(File.Exists(restoredTemplatePath), "Expected template to be restored from vault after reload."); + } + finally + { + Environment.SetEnvironmentVariable("JOURNAL_PROJECT_ROOT", previousProjectRoot); + Environment.SetEnvironmentVariable("JOURNAL_DATA_DIR", previousDataDir); + Environment.SetEnvironmentVariable("JOURNAL_VAULT_DIR", previousVaultDir); + + if (Directory.Exists(root)) + Directory.Delete(root, recursive: true); + } + } +} + diff --git a/Journal.SmokeTests/Program.cs b/Journal.SmokeTests/Program.cs new file mode 100644 index 0000000..6e99b60 --- /dev/null +++ b/Journal.SmokeTests/Program.cs @@ -0,0 +1,103 @@ +internal static partial class Program +{ + private static async Task<int> Main() + { + var tests = new List<(string Name, Func<Task> Run)> + { + ("CreateAsync trims fields", TestCreateTrimsAsync), + ("UpdateAsync accepts valid type updates", TestUpdateAcceptsTypeAsync), + ("UpdateAsync rejects whitespace type", TestUpdateRejectsWhitespaceTypeAsync), + ("JournalEntry model stores parity fields", TestJournalEntryModelAsync), + ("MergeWith overwrites section when new content is meaningful", TestMergeOverwritesMeaningfulSectionAsync), + ("MergeWith ignores whitespace-only section updates", TestMergeIgnoresWhitespaceOnlySectionAsync), + ("MergeWith appends non-duplicate fragments by description", TestMergeAppendsNonDuplicateFragmentsAsync), + ("ToMarkdown writes canonical section order", TestToMarkdownCanonicalSectionOrderAsync), + ("ToMarkdown writes fragment blocks", TestToMarkdownFragmentFormattingAsync), + ("Vault crypto roundtrip preserves data and layout", TestVaultCryptoRoundtripAsync), + ("Vault crypto decrypts Python payload fixture", TestVaultCryptoDecryptsPythonFixtureAsync), + ("Vault key derivation matches Python fixture", TestVaultKeyDerivationMatchesPythonAsync), + ("Vault monthly filename matches parity format", TestVaultMonthlyFilenameParityAsync), + ("Vault load clears workspace and extracts decrypted files", TestVaultLoadClearsAndExtractsAsync), + ("Vault load wrong password does not modify vault files", TestVaultLoadWrongPasswordPreservesVaultAsync), + ("Vault load ignores and removes legacy _init_vault.vault", TestVaultLoadLegacyInitVaultHandlingAsync), + ("Vault current-month save writes only current month and skips unchanged state", TestVaultCurrentMonthSaveOptimizedAsync), + ("Vault rebuild saves grouped monthly archives from decrypted files", TestVaultRebuildAllVaultsAsync), + ("Vault clear data directory removes decrypted workspace artifacts", TestVaultClearDataDirectoryAsync), + ("Parser extracts date from **Date:** marker", TestParserExtractsBoldDateAsync), + ("Parser extracts date from Date: marker", TestParserExtractsPlainDateAsync), + ("Parser falls back to file stem when date missing", TestParserFallsBackToFileStemAsync), + ("Parser captures canonical sections and content", TestParserCapturesSectionsAsync), + ("Parser ignores non-canonical section headers", TestParserIgnoresNonCanonicalHeadersAsync), + ("Parser captures checkbox states per section", TestParserCapturesCheckboxStatesAsync), + ("Parser captures multiline fragment blocks", TestParserCapturesMultilineFragmentsAsync), + ("Parser fragment boundary follows header lines", TestParserFragmentBoundaryBehaviorAsync), + ("File repository persists fragments", TestFileRepositoryPersistsAsync), + ("Entry invalid JSON returns error envelope", TestEntryInvalidJsonAsync), + ("Entry unknown action returns error envelope", TestEntryUnknownActionAsync), + ("Entry get missing id returns ok with null data", TestEntryGetMissingReturnsNullDataAsync), + ("Entry create without payload returns error envelope", TestEntryCreateMissingPayloadAsync), + ("Entry entries.save writes and merges content", TestEntryEntriesSaveMergeAsync), + ("Entry entries.load returns raw content payload", TestEntryEntriesLoadAsync), + ("Entry entries.list returns markdown files", TestEntryEntriesListAsync), + ("Entry templates CRUD stores .template.md and entries.list excludes templates", TestEntryTemplatesCrudExcludesFromEntriesListAsync), + ("Entry search.entries matches query against full raw content", TestEntrySearchEntriesMatchesRawContentAsync), + ("Entry search.entries without query returns all markdown entries", TestEntrySearchEntriesWithoutQueryReturnsAllAsync), + ("Entry search.entries applies date range filter", TestEntrySearchEntriesDateRangeFilterAsync), + ("Entry search.entries applies section-scoped query filter", TestEntrySearchEntriesSectionFilterAsync), + ("Entry search.entries applies fragment tag and type filters", TestEntrySearchEntriesTagTypeFilterAsync), + ("Entry search.entries applies checkbox checked and unchecked filters", TestEntrySearchEntriesCheckboxFilterAsync), + ("Entry search.entries rejects invalid date filter format", TestEntrySearchEntriesRejectsInvalidDateAsync), + ("Database key derivation matches Python fixture", TestDatabaseKeyDerivationMatchesPythonAsync), + ("Database schema parity tables are created", TestDatabaseSchemaParityAsync), + ("Entry db.status returns database compatibility payload", TestEntryDatabaseStatusAsync), + ("Entry db.initialize_schema creates schema in data directory", TestEntryDatabaseInitializeSchemaAsync), + ("Entry db.hydrate_workspace returns hydration metadata", TestEntryDatabaseHydrateWorkspaceAsync), + ("Config service exposes parity path, vault, AI, and speech settings", TestConfigServiceParityKeysAsync), + ("Entry config.get returns config payload", TestEntryConfigGetAsync), + ("Log redactor scrubs sensitive payload fields", TestLogRedactorScrubsSensitiveFieldsAsync), + ("Log redactor preserves non-sensitive payload fields", TestLogRedactorPreservesNonSensitiveFieldsAsync), + ("Entry ai.health returns disabled by default", TestEntryAiHealthDefaultAsync), + ("Entry ai.summarize_entry succeeds when disabled", TestEntryAiSummarizeEntryDisabledAsync), + ("Entry ai.summarize_all succeeds when disabled", TestEntryAiSummarizeAllDisabledAsync), + ("Entry ai.chat succeeds when disabled", TestEntryAiChatDisabledAsync), + ("Entry ai.embed returns empty vector when disabled", TestEntryAiEmbedDisabledAsync), + ("Entry speech.devices.list returns envelope when disabled", TestEntrySpeechDevicesListDisabledAsync), + ("Entry speech.transcribe returns envelope when disabled", TestEntrySpeechTranscribeDisabledAsync), + ("Python sidecar AI service parses last JSON line", TestPythonSidecarAiServiceJsonLineAsync), + ("Python sidecar AI service surfaces sidecar errors", TestPythonSidecarAiServiceErrorAsync), + ("Python sidecar speech service handles empty devices payload", TestPythonSidecarSpeechServiceNoDevicesAsync), + ("Python sidecar speech service surfaces unavailable engine errors", TestPythonSidecarSpeechServiceErrorAsync), + ("Python sidecar speech service times out deterministically", TestPythonSidecarSpeechServiceTimeoutAsync), + ("Entry vault.load_all succeeds for empty vault directory", TestEntryVaultLoadAllEmptyAsync), + ("Entry vault.load_all wrong password keeps database session locked", TestEntryVaultLoadWrongPasswordKeepsSessionLockedAsync), + ("Entry vault.clear_data_directory removes files", TestEntryVaultClearDataDirectoryAsync), + ("Entry templates.save auto-syncs vault and survives reload", TestEntryTemplateSaveAutoSyncsVaultAsync), + ("Sidecar vault CLI load succeeds with --password", TestSidecarVaultCliLoadAsync), + ("Sidecar vault CLI save writes monthly vault with --password", TestSidecarVaultCliSaveAsync), + ("Sidecar search CLI returns matching entries with filters", TestSidecarSearchCliFilteredAsync), + ("Sidecar search CLI warns when no decrypted entries exist", TestSidecarSearchCliEmptyDataAsync), + ("Transport fixtures produce stable envelopes", TestTransportFixturesAsync), + ("EntrySavePayload deserializes camelCase fileName from JsonElement", TestEntrySavePayloadFileNameDeserializationAsync), + ("entries.save with fileName creates custom-named file", TestEntrySaveWithFileNameAsync), + ("Vault rebuild and load preserves custom-named entries", TestVaultCustomEntryRoundtripAsync), + }; + + var passed = 0; + foreach (var (name, run) in tests) + { + try + { + await run(); + Console.WriteLine($"PASS {name}"); + passed++; + } + catch (Exception ex) + { + Console.WriteLine($"FAIL {name}: {ex.Message}"); + } + } + + Console.WriteLine($"Summary: {passed}/{tests.Count} passed."); + return passed == tests.Count ? 0 : 1; + } +} diff --git a/Journal.WebGateway/Journal.WebGateway.csproj b/Journal.WebGateway/Journal.WebGateway.csproj new file mode 100644 index 0000000..511c2f0 --- /dev/null +++ b/Journal.WebGateway/Journal.WebGateway.csproj @@ -0,0 +1,13 @@ +<Project Sdk="Microsoft.NET.Sdk.Web"> + + <PropertyGroup> + <TargetFramework>net10.0</TargetFramework> + <Nullable>enable</Nullable> + <ImplicitUsings>enable</ImplicitUsings> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Journal.Core\Journal.Core.csproj" /> + </ItemGroup> + +</Project> diff --git a/Journal.WebGateway/Program.cs b/Journal.WebGateway/Program.cs new file mode 100644 index 0000000..fca14ce --- /dev/null +++ b/Journal.WebGateway/Program.cs @@ -0,0 +1,262 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using Journal.Core; +using Microsoft.Extensions.FileProviders; + +var gatewayJsonOptions = new JsonSerializerOptions +{ + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + PropertyNameCaseInsensitive = true, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull +}; + +var repoRoot = ResolveRepoRoot(); +Environment.SetEnvironmentVariable("JOURNAL_PROJECT_ROOT", repoRoot); +var webDistPath = ResolveWebDist(repoRoot); + +var builder = WebApplication.CreateBuilder(args); + +builder.Services.AddFragmentServices(); +builder.Services.AddSingleton<Entry>(); +builder.Services.AddSingleton(new SidecarRootState(repoRoot)); +builder.Services.AddSingleton(new WebUiState(webDistPath)); + +builder.Services.AddCors(options => +{ + options.AddPolicy("GatewayCors", policy => + { + policy.AllowAnyOrigin() + .AllowAnyHeader() + .AllowAnyMethod(); + }); +}); + +builder.Services.ConfigureHttpJsonOptions(options => +{ + options.SerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; + options.SerializerOptions.PropertyNameCaseInsensitive = true; +}); + +var app = builder.Build(); + +app.UseCors("GatewayCors"); + +app.MapGet("/api/health", () => Results.Ok(new +{ + ok = true, + service = "Journal.WebGateway" +})); + +app.MapGet("/api/web/status", (WebUiState webUiState) => Results.Ok(new +{ + distPath = webUiState.DistPath, + exists = webUiState.Exists +})); + +app.MapPost("/api/command", async (CommandEnvelope? command, Entry entry) => +{ + if (command is null || string.IsNullOrWhiteSpace(command.Action)) + { + return Results.Content(ErrorResponse("Missing action"), "application/json"); + } + + var inputJson = JsonSerializer.Serialize(command, gatewayJsonOptions); + var responseJson = await entry.HandleCommandAsync(inputJson); + return Results.Content(responseJson, "application/json"); +}); + +app.MapGet("/api/sidecar/root", (SidecarRootState rootState) => +{ + var (root, isCustom) = rootState.Get(); + return Results.Ok(new + { + root, + isCustom + }); +}); + +app.MapPost("/api/sidecar/root", (SetSidecarRootRequest? request, SidecarRootState rootState) => +{ + var path = request?.Path ?? ""; + if (!string.IsNullOrWhiteSpace(path) && !Directory.Exists(path)) + { + return Results.BadRequest($"Directory '{path}' does not exist."); + } + + rootState.Set(path); + var (root, isCustom) = rootState.Get(); + Environment.SetEnvironmentVariable("JOURNAL_PROJECT_ROOT", root); + return Results.Ok(new + { + root, + isCustom + }); +}); + +if (Directory.Exists(webDistPath) && File.Exists(Path.Combine(webDistPath, "index.html"))) +{ + var fileProvider = new PhysicalFileProvider(webDistPath); + var indexPath = Path.Combine(webDistPath, "index.html"); + + app.UseDefaultFiles(new DefaultFilesOptions + { + FileProvider = fileProvider, + RequestPath = "" + }); + + app.UseStaticFiles(new StaticFileOptions + { + FileProvider = fileProvider, + RequestPath = "" + }); + + app.MapGet("/", async context => + { + context.Response.ContentType = "text/html; charset=utf-8"; + await context.Response.SendFileAsync(indexPath); + }); + + app.MapFallback(async context => + { + if (context.Request.Path.StartsWithSegments("/api")) + { + context.Response.StatusCode = StatusCodes.Status404NotFound; + return; + } + + context.Response.ContentType = "text/html; charset=utf-8"; + await context.Response.SendFileAsync(indexPath); + }); +} +else +{ + app.MapGet("/", () => Results.Ok(new + { + name = "Journal.WebGateway", + status = "ok", + uiAvailable = false, + message = "No built web UI found. Build Journal.App with ./scripts/publish-app.ps1 -Target web.", + expectedDist = webDistPath + })); +} + +app.Run(); + +string ResolveRepoRoot() +{ + var fromEnv = Environment.GetEnvironmentVariable("JOURNAL_PROJECT_ROOT"); + if (!string.IsNullOrWhiteSpace(fromEnv) && Directory.Exists(fromEnv)) + { + return Path.GetFullPath(fromEnv); + } + + foreach (var start in new[] { Directory.GetCurrentDirectory(), AppContext.BaseDirectory }) + { + var resolved = FindRepoRoot(start); + if (resolved is not null) + { + return resolved; + } + } + + return Path.GetFullPath(Directory.GetCurrentDirectory()); +} + +string? FindRepoRoot(string start) +{ + var cursor = Path.GetFullPath(start); + + while (!string.IsNullOrWhiteSpace(cursor)) + { + if (File.Exists(Path.Combine(cursor, "Journal.slnx")) || + Directory.Exists(Path.Combine(cursor, "Journal.Sidecar")) || + Directory.Exists(Path.Combine(cursor, "Journal.Core"))) + { + return cursor; + } + + var parent = Directory.GetParent(cursor); + if (parent is null || string.Equals(parent.FullName, cursor, StringComparison.OrdinalIgnoreCase)) + { + return null; + } + + cursor = parent.FullName; + } + + return null; +} + +string ResolveWebDist(string repoRootPath) +{ + var fromEnv = Environment.GetEnvironmentVariable("JOURNAL_WEB_DIST"); + if (!string.IsNullOrWhiteSpace(fromEnv)) + { + return Path.GetFullPath(fromEnv); + } + + var packagedWwwRoot = Path.Combine(AppContext.BaseDirectory, "wwwroot"); + if (Directory.Exists(packagedWwwRoot)) + { + return packagedWwwRoot; + } + + return Path.Combine(repoRootPath, "Journal.App", "build"); +} + +string ErrorResponse(string message) + => JsonSerializer.Serialize(new { ok = false, error = message }, gatewayJsonOptions); + +sealed class WebUiState(string distPath) +{ + public string DistPath { get; } = distPath; + + public bool Exists => Directory.Exists(DistPath) && File.Exists(Path.Combine(DistPath, "index.html")); +} + +sealed class SidecarRootState(string autoRoot) +{ + private readonly object _sync = new(); + private readonly string _autoRoot = autoRoot; + private string _currentRoot = autoRoot; + private bool _isCustom; + + public (string Root, bool IsCustom) Get() + { + lock (_sync) + { + return (_currentRoot, _isCustom); + } + } + + public void Set(string? path) + { + lock (_sync) + { + if (string.IsNullOrWhiteSpace(path)) + { + _currentRoot = _autoRoot; + _isCustom = false; + return; + } + + _currentRoot = Path.GetFullPath(path.Trim()); + _isCustom = true; + } + } +} + +sealed class SetSidecarRootRequest +{ + public string? Path { get; set; } +} + +sealed class CommandEnvelope +{ + public string Action { get; set; } = ""; + public string? CorrelationId { get; set; } + public string? Id { get; set; } + public string? Type { get; set; } + public string? Tag { get; set; } + public JsonElement? Payload { get; set; } +} diff --git a/Journal.slnx b/Journal.slnx new file mode 100644 index 0000000..090dfed --- /dev/null +++ b/Journal.slnx @@ -0,0 +1,7 @@ +<Solution> + <Project Path="Journal.Core/Journal.Core.csproj" /> + <Project Path="Journal.Sidecar/Journal.Sidecar.csproj" /> + <Project Path="Journal.SmokeTests/Journal.SmokeTests.csproj" /> + <Project Path="Journal.DevTool/Journal.DevTool.csproj" /> + <Project Path="Journal.WebGateway/Journal.WebGateway.csproj" /> +</Solution> diff --git a/README.md b/README.md new file mode 100644 index 0000000..9618106 --- /dev/null +++ b/README.md @@ -0,0 +1,538 @@ +# Project Journal + +A structured journaling system with encrypted monthly vaults, a Tauri desktop app, a web gateway server, CLI tools, and optional AI-assisted analysis. + +## Repository Layout + +``` +journal/ +├── Journal.Core/ .NET class library — all business logic and services +├── Journal.Sidecar/ Console app — stdin/stdout JSON protocol (Tauri sidecar bridge + CLI) +├── Journal.WebGateway/ ASP.NET Core app — HTTP wrapper for browser/web mode +├── Journal.SmokeTests/ Integration tests (~80 tests, no test framework dependency) +├── Journal.App/ SvelteKit + Tauri desktop app +│ ├── src/ SvelteKit frontend source +│ ├── src-tauri/ Rust Tauri shell (sidecar process manager) +│ └── static/ Static assets +├── scripts/ PowerShell dev, build, publish, and cache helpers +├── docs/ Internal design docs +└── journal/ Runtime data directories (vault/, data/) +``` + +## Deployment Modes + +The backend can run in three modes depending on the surface wired to it: + +| Mode | Host | Frontend | +|------|------|----------| +| **Tauri desktop app** | `Journal.App` (Tauri + Rust) | SvelteKit embedded via Tauri WebView | +| **WebGateway server** | `Journal.WebGateway` (ASP.NET Core) | SvelteKit build served from `wwwroot` | +| **Sidecar CLI / stdin** | `Journal.Sidecar` (console) | None — raw JSON protocol | + +All three modes share the same `Journal.Core` service layer and command protocol. + +--- + +## Platform Support + +- **Windows** — first-class (primary development target) +- **Linux** — first-class +- **macOS** — best effort + +### Prerequisites + +- [.NET 10 SDK](https://dotnet.microsoft.com/download) +- [Node.js](https://nodejs.org/) + npm (for `Journal.App` frontend) +- [Rust + Cargo](https://rustup.rs/) (for `Journal.Sidecar` Tauri desktop build) +- PowerShell 7+ (`pwsh`) recommended for scripts + +--- + +## Quickstart + +### Option A — Tauri Desktop App + +Build the sidecar, then the Tauri app: + +```powershell +cd Journal.App +npm install +npm run tauri build +``` + +Or via the publish scripts (recommended for clean environments): + +```powershell +.\scripts\publish-sidecar.ps1 -Configuration Release -Runtime win-x64 +.\scripts\publish-app.ps1 -Target tauri -TauriBundles none +``` + +Tauri auto-detects `Journal.Sidecar.exe` in the repository. On first launch it walks up from the working directory to find `Journal.Sidecar/` and resolves the built executable. + +### Option B — WebGateway Server (browser mode) + +Build the web UI bundle, then publish the gateway with web assets embedded: + +```powershell +.\scripts\publish-app.ps1 -Target web +.\scripts\publish-webgateway.ps1 -Configuration Release -Runtime win-x64 +``` + +Run the gateway: + +```powershell +.\scripts\run-webgateway.ps1 -Urls http://0.0.0.0:5180 +``` + +Open `http://localhost:5180` in your browser. The gateway automatically serves the SvelteKit build and proxies all `/api/command` calls to `Journal.Core`. + +Quick health check: + +```powershell +Invoke-RestMethod http://127.0.0.1:5180/api/health +``` + +### Option C — Sidecar / CLI only + +```powershell +cd Journal.Core +dotnet build + +# Run in stdin/stdout protocol mode +dotnet run --project Journal.Sidecar + +# CLI subcommands +dotnet run --project Journal.Sidecar -- vault load --password <value> +dotnet run --project Journal.Sidecar -- vault save --password <value> +dotnet run --project Journal.Sidecar -- search "your query" --tag stress --start-date 2026-02-01 +``` + +--- + +## C# Backend + +### Projects + +| Project | Type | Purpose | +|---------|------|---------| +| `Journal.Core` | Class library | Domain models, services, repositories, DTOs — all business logic | +| `Journal.Sidecar` | Console app | Stdin/stdout JSON protocol + vault/search CLI subcommands | +| `Journal.WebGateway` | ASP.NET Core | HTTP API wrapper; serves built SvelteKit UI from `wwwroot` | +| `Journal.SmokeTests` | Console app | ~80 integration tests (no xunit/nunit) | + +### Solution File + +``` +Journal.slnx (Visual Studio solution — Core + Sidecar + SmokeTests) +``` + +> `Journal.WebGateway` is not in the solution file; build/run it directly with `dotnet` or the `scripts/` wrappers. + +### Architecture + +``` +Entry (thin command dispatcher — shared by all three hosts) + ├── Fragments/ IFragmentService → FragmentService → SQLiteFragmentRepository (SQLCipher) + ├── Entries/ IEntryFileService → EntryFileService → DiskEntryFileRepository + │ IEntrySearchService → EntrySearchService (raw content + structured filters) + │ JournalParser (date / section / checkbox / fragment parsing) + ├── Lists/ IListService → ListService → SqliteListRepository + ├── Todos/ ITodoService → TodoService → SqliteTodoRepository + ├── Vault/ IVaultStorageService → VaultStorageService → IVaultCryptoService + ├── Database/ IJournalDatabaseService (SQLCipher schema/key derivation/hydration) + │ IDatabaseSessionService (encrypted connection lifecycle after auth) + ├── Ai/ IAiService → PythonSidecarAiService | DisabledAiService + ├── Speech/ ISpeechBridgeService → PythonSidecarSpeechService | DisabledSpeechBridgeService + ├── Sidecar/ PythonSidecarClient (shared Python process I/O), SidecarCli + ├── Logging/ CommandLogger, LogRedactor + └── Config/ IJournalConfigService → JournalConfigService +``` + +Services live under `Journal.Core/Services/` in domain-specific subdirectories, each with its own namespace (e.g. `Journal.Core.Services.Ai`). + +### Build + +```powershell +# Build all projects +dotnet build + +# Or use the resilient wrapper (handles proxy/NuGet quirks): +.\scripts\dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj +.\scripts\dotnet-min.ps1 build Journal.WebGateway/Journal.WebGateway.csproj +``` + +### Run Smoke Tests + +```powershell +dotnet run --project Journal.SmokeTests +``` + +### Dependencies + +- `Journal.Core` — `Microsoft.Data.Sqlite.Core`, `SQLitePCLRaw.bundle_e_sqlcipher`, `Microsoft.Extensions.DependencyInjection.Abstractions` +- `Journal.Sidecar` — `Microsoft.Extensions.DependencyInjection` + references `Journal.Core` +- `Journal.WebGateway` — `Microsoft.NET.Sdk.Web` + references `Journal.Core` +- `Journal.SmokeTests` — references `Journal.Core` + +### Encryption + +- **Vault**: AES-256-GCM with PBKDF2-HMAC-SHA256 key derivation (600k iterations) — wire format matches the Python implementation for cross-language parity +- **Database**: SQLCipher with PBKDF2-derived key +- Fragments and structured data are stored in the encrypted SQLCipher database; auth is required via `vault.load_all` or `db.hydrate_workspace` +- `DatabaseSessionService` holds the encryption password in memory after first auth and closes the connection on `vault.clear_data_directory` + +### Environment Variables + +| Variable | Default | Description | +|----------|---------|-------------| +| `JOURNAL_PROJECT_ROOT` | auto-detected | Override project root (vault + data path resolution) | +| `JOURNAL_DATA_DIR` | `<root>/journal/data` | Override decrypted data directory | +| `JOURNAL_VAULT_DIR` | `<root>/journal/vault` | Override vault directory | +| `JOURNAL_AI_PROVIDER` | `none` | `none` or `python-sidecar` | +| `JOURNAL_PYTHON_EXE` | `python` | Python executable for AI/speech sidecar | +| `JOURNAL_AI_SIDECAR_PATH` | auto | Path to Python AI sidecar script | +| `JOURNAL_AI_TIMEOUT_MS` | 30000 | AI sidecar timeout | +| `JOURNAL_NLP_BACKEND` | `auto` | `auto`, `spacy`, or `fallback` | +| `JOURNAL_LOG_LEVEL` | `warning` | `trace`, `debug`, `information`, `warning`, `error`, `critical` | +| `JOURNAL_WEB_DIST` | auto | Override web UI dist path for WebGateway | + +--- + +## Journal.WebGateway + +An ASP.NET Core minimal API that wraps `Journal.Core` for browser use. + +### Endpoints + +| Method | Path | Description | +|--------|------|-------------| +| `GET` | `/api/health` | Health check | +| `POST` | `/api/command` | Send a JSON command to `Entry.HandleCommandAsync` | +| `GET` | `/api/web/status` | Reports web dist path and whether UI is available | +| `GET` | `/api/sidecar/root` | Returns current project root (auto-detected or custom) | +| `POST` | `/api/sidecar/root` | Override project root at runtime | +| `GET` | `/*` | Serves built SvelteKit UI from `wwwroot` (SPA fallback) | + +### Web UI Resolution + +On startup, `Journal.WebGateway` resolves the web dist in this order: + +1. `JOURNAL_WEB_DIST` environment variable +2. `<AppContext.BaseDirectory>/wwwroot` (embedded in published output) +3. `Journal.App/build` (dev fallback — relative to repo root) + +If no dist is found, `/` returns a JSON status message instead of the UI. + +### Running WebGateway + +```powershell +dotnet run --project Journal.WebGateway +# or +.\scripts\run-webgateway.ps1 -Urls http://0.0.0.0:5180 -ProjectRoot E:\path\to\journal +``` + +--- + +## Journal.App (Tauri + SvelteKit) + +A Tauri 2 desktop application with a SvelteKit 5 / TypeScript frontend. + +### Tech Stack + +- **Frontend**: SvelteKit 5, TypeScript, Vite 6 +- **Tauri shell**: Rust (Tauri 2), `tokio` for async process I/O +- **Backend bridge**: `Journal.Sidecar.exe` managed as a long-lived child process + +### Tauri Sidecar Architecture + +The Rust layer (`src-tauri/src/lib.rs`) manages a persistent `Journal.Sidecar.exe` child process: + +- Sidecar is auto-started on first command and restarted if it dies +- Commands are sent as JSON lines to stdin, responses read from stdout +- `JOURNAL_PROJECT_ROOT` is set to the resolved repo root before spawning +- On Windows, the process is created with `CREATE_NO_WINDOW` + +Tauri commands exposed to the frontend: + +| Command | Description | +|---------|-------------| +| `sidecar_command` | Forward a `CommandEnvelope` to `Journal.Sidecar` and return parsed JSON | +| `get_sidecar_root` | Get the current resolved sidecar root path | +| `set_sidecar_root` | Override sidecar root path (saves to `settings.json`, restarts sidecar) | +| `get_ui_settings` | Load tag/fragment-type settings from `settings.json` | +| `set_ui_settings` | Persist tag/fragment-type settings | +| `shutdown` | Stop the sidecar and exit the app | + +Sidecar path resolution order (relative to root): + +1. `Journal.Sidecar.exe` in root +2. `publish/Journal.Sidecar.exe` +3. `Journal.Sidecar/bin/Debug/net10.0/Journal.Sidecar.exe` +4. `Journal.Sidecar/bin/Release/net10.0/win-x64/publish/Journal.Sidecar.exe` +5. Recursive scan of `Journal.Sidecar/` + +### Frontend State + +The frontend uses Svelte stores as the source of truth: + +| Store | State | Purpose | +|-------|-------|---------| +| `entries.ts` | `entriesStore` | Journal entry list and drafts | +| `fragments.ts` | `fragmentsStore` | Fragment CRUD + parse/serialize helpers | +| `todos.ts` | `todoListsStore`, `todosStore` | Todo lists and items | +| `lists.ts` | `listsStore` | Generic lists | +| `settings.ts` | `settingsTags`, `settingsFragmentTypes` | Tag/type configuration | + +**Store-First Rule**: components call store helpers for CRUD; they do not embed mutation or parsing logic directly. + +### Dev Setup + +```powershell +cd Journal.App +npm install +npm run dev # SvelteKit dev server at http://localhost:1420 +npm run tauri dev # Tauri dev mode (opens desktop window) +``` + +### Publishing + +```powershell +# Web bundle only (for WebGateway) +.\scripts\publish-app.ps1 -Target web +# Output: Journal.App/build/ + +# Tauri raw exe (no installer) +.\scripts\publish-app.ps1 -Target tauri -TauriBundles none +# Output: Journal.App/src-tauri/target/release/journalapp.exe + +# Tauri with NSIS installer +.\scripts\publish-app.ps1 -Target tauri -TauriBundles nsis +``` + +--- + +## Sidecar Protocol + +`Journal.Sidecar` communicates over **stdin/stdout** using newline-delimited JSON. One JSON object in, one JSON object out. + +### Command Format + +```json +{ + "action": "fragments.create", + "correlationId": null, + "id": null, + "type": null, + "tag": null, + "payload": { "type": "!TRIGGER", "description": "stomach drop" } +} +``` + +**Fields:** +- `action` — Operation to perform (e.g. `fragments.list`, `vault.load_all`) +- `correlationId` — Optional tracing ID (auto-generated if omitted) +- `id` — Target entity ID (for get/update/delete) +- `type` / `tag` — Filter parameters (for fragment search) +- `payload` — Request body, deserialized per action + +### Response Format + +Success: +```json +{ "ok": true, "data": { "id": "abc-123", "type": "!TRIGGER", "description": "...", "time": "...", "tags": [] } } +``` + +Error: +```json +{ "ok": false, "error": "Description is required" } +``` + +### Available Actions + +| Action | Description | Key Requirements | +|--------|-------------|------------------| +| `fragments.list` | List all fragments | — | +| `fragments.get` | Get by ID | `id` | +| `fragments.create` | Create fragment | `payload` (CreateFragmentDto) | +| `fragments.update` | Update fragment | `id`, `payload` (UpdateFragmentDto) | +| `fragments.delete` | Delete fragment | `id` | +| `fragments.search` | Filter by type/tag | `type` and/or `tag` | +| `lists.list` | List all lists | — | +| `lists.get` | Get list by ID | `id` | +| `lists.create` | Create list | `payload` | +| `lists.update` | Update list | `id`, `payload` | +| `lists.delete` | Delete list | `id` | +| `todos.list` | List all todo lists | — | +| `todos.get` | Get todo list by ID | `id` | +| `todos.create` | Create todo list | `payload` | +| `todos.update` | Update todo list | `id`, `payload` | +| `todos.delete` | Delete todo list | `id` | +| `todos.items.create` | Add todo item | `payload` | +| `todos.items.update` | Update todo item | `id`, `payload` | +| `todos.items.delete` | Delete todo item | `id` | +| `entries.list` | List decrypted `.md` entries | optional `payload.dataDirectory` | +| `entries.load` | Load one entry file | `payload.filePath` | +| `entries.save` | Save/merge entry content | `payload.content`, optional `payload.filePath`, `payload.mode`, `payload.fileName` | +| `entries.delete` | Delete an entry file | `payload.filePath` | +| `templates.list` | List `.template.md` files | optional `payload.dataDirectory` | +| `templates.load` | Load a template | `payload.filePath` | +| `templates.save` | Save/create a template | `payload.name` | +| `templates.delete` | Delete a template | `payload.filePath` | +| `search.entries` | Search entries with filters | `payload.dataDirectory`, optional query/section/date/tags/types/checked/unchecked | +| `vault.initialize` | Ensure vault directory exists | `payload.password`, `payload.vaultDirectory` | +| `vault.load_all` | Decrypt all monthly vaults → data dir | `payload.password`, `payload.vaultDirectory`, `payload.dataDirectory` | +| `vault.save_current_month` | Encrypt only current month (optimized) | `payload.password`, `payload.vaultDirectory`, `payload.dataDirectory` | +| `vault.rebuild_all` | Rebuild all monthly vaults from data | `payload.password`, `payload.vaultDirectory`, `payload.dataDirectory` | +| `vault.clear_data_directory` | Wipe decrypted data directory | `payload.dataDirectory` | +| `db.status` | DB key/schema compatibility snapshot | `payload.password`, optional `payload.dataDirectory` | +| `db.initialize_schema` | Write SQL schema bootstrap file | optional `payload.dataDirectory` | +| `db.hydrate_workspace` | Bootstrap DB + set session password | `payload.password`, optional `payload.dataDirectory` | +| `config.get` | Return current config snapshot | — | +| `ai.health` | AI provider health status | — | +| `ai.summarize_entry` | Summarize one entry | `payload.content`, optional `payload.fileStem` | +| `ai.summarize_all` | Summarize multiple entries | `payload.entries[]` | +| `ai.chat` | Chat via AI provider bridge | `payload.prompt` | +| `ai.embed` | Generate embedding vector | `payload.content` | +| `speech.devices.list` | List audio input devices | — | +| `speech.transcribe` | Transcribe audio (base64) or text | `payload.audioBase64` or `payload.text` | + +### Sidecar CLI Mode + +In addition to stdin/stdout protocol, `Journal.Sidecar` supports direct CLI subcommands: + +```powershell +# Load/decrypt all vaults into data workspace +dotnet run --project Journal.Sidecar -- vault load + +# Save (rebuild) monthly vaults from decrypted markdown files +dotnet run --project Journal.Sidecar -- vault save + +# Search entries (query + filters) +dotnet run --project Journal.Sidecar -- search "common text" --tag stress --type !TRIGGER --start-date 2026-02-01 --end-date 2026-02-28 --section Summary --checked "med taken" +``` + +**Password behavior:** +- Omit `--password` → prompts securely in terminal +- Pass `--password <value>` → non-interactive/automation mode + +**Optional path overrides:** +- `--vault-dir <path>` / `--data-dir <path>` +- Env fallback: `JOURNAL_VAULT_DIR`, `JOURNAL_DATA_DIR`, `JOURNAL_APP_DIR` + +**Search CLI flags:** +- positional `query` (optional) +- `--tag` / `-t` (repeatable) +- `--type` / `-y` (repeatable) +- `--start-date` / `-s` (`yyyy-MM-dd`) +- `--end-date` / `-e` (`yyyy-MM-dd`) +- `--section` / `-sec` +- `--checked` / `-chk` (repeatable) +- `--unchecked` / `-uchk` (repeatable) +- `--data-dir <path>` (optional override) + +--- + +## Publishing + +### Sidecar (self-contained executable) + +```powershell +.\scripts\publish-sidecar.ps1 -Configuration Release -Runtime win-x64 +# Output: output\Journal.Sidecar.exe (~70MB, all bundled) +``` + +Or raw `dotnet publish`: + +```powershell +dotnet publish Journal.Sidecar/Journal.Sidecar.csproj -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true +``` + +To exclude debug symbols: add `-p:DebugType=none` + +For a smaller build that requires .NET 10 on the target machine: + +```powershell +dotnet publish Journal.Sidecar/Journal.Sidecar.csproj -c Release -r win-x64 -p:PublishSingleFile=true +``` + +### WebGateway (with embedded web UI) + +```powershell +# Step 1: build web assets +.\scripts\publish-app.ps1 -Target web + +# Step 2: publish gateway (copies web assets into wwwroot automatically) +.\scripts\publish-webgateway.ps1 -Configuration Release -Runtime win-x64 +# Output: output\webgateway\ (with output\webgateway\wwwroot\ from Journal.App\build) +``` + +--- + +## DI Registration + +`ServiceCollectionExtensions.AddFragmentServices()` wires everything. Any host calls: + +```csharp +services.AddFragmentServices(); +services.AddSingleton<Entry>(); +``` + +Key registrations: +- `IDatabaseSessionService` → `DatabaseSessionService` (singleton) +- `IFragmentRepository` → `SqliteFragmentRepository` (singleton, SQLCipher-backed) +- `IFragmentService` → `FragmentService` (singleton) +- `IEntryFileRepository` → `DiskEntryFileRepository` (singleton) +- `IEntryFileService` → `EntryFileService` (singleton) +- `IListRepository` → `SqliteListRepository` (singleton) +- `IListService` → `ListService` (singleton) +- `ITodoRepository` → `SqliteTodoRepository` (singleton) +- `ITodoService` → `TodoService` (singleton) +- `IVaultCryptoService` → `VaultCryptoService` (singleton) +- `IVaultStorageService` → `VaultStorageService` (singleton) +- `IJournalDatabaseService` → `JournalDatabaseService` (singleton) +- `IAiService` → `PythonSidecarAiService` or `DisabledAiService` (per `JOURNAL_AI_PROVIDER`) +- `ISpeechBridgeService` → `PythonSidecarSpeechService` or `DisabledSpeechBridgeService` +- `IJournalConfigService` → `JournalConfigService` (singleton) +- `CommandLogger` (singleton) +- `SidecarCli` (singleton) + +--- + +## Extending with New Modules + +The `Command`/`Entry` pattern uses dot-notation actions. To add a module: + +1. Create model, DTO, repository, and service in `Journal.Core/Services/<Domain>/` +2. Register services in `ServiceCollectionExtensions.cs` +3. Inject the service into `Entry.cs` and add cases to the `switch` +4. No changes needed to `App.cs`, `Journal.WebGateway/Program.cs`, or the Tauri Rust shell + +--- + +## Scripts + +See [`scripts/README.md`](scripts/README.md) for the full reference and [`scripts/WORKFLOWS.md`](scripts/WORKFLOWS.md) for copy-paste command recipes. + +Quick reference: + +| Script | Purpose | +|--------|---------| +| `dev-shell.ps1` | Dot-source to configure current shell with repo-local env vars | +| `dotnet-min.ps1` | `dotnet` wrapper with resilient NuGet defaults | +| `pip-min.ps1` | `pip` wrapper with repo-local cache and Windows compat mapping | +| `publish-app.ps1` | Build web bundle or Tauri desktop app | +| `publish-sidecar.ps1` | Publish `Journal.Sidecar` single-file exe to `output/` | +| `publish-webgateway.ps1` | Publish `Journal.WebGateway` with optional web assets | +| `run-webgateway.ps1` | Run `Journal.WebGateway` with controlled env and project root | +| `migration-gate.ps1` | End-to-end build + smoke + parity + API check gate | +| `nuget-export-cache.ps1` | Export NuGet cache to zip for offline/transfer use | +| `nuget-import-cache.ps1` | Import NuGet cache zip and validate restore | + +--- + +## Notes + +- Decrypted journal data in `journal/data/` is cleared on graceful shutdown (`vault.clear_data_directory`). +- The legacy Python placeholder file `_init_vault.vault` is treated as obsolete — the C# backend ignores and removes it during vault load. +- `Journal.WebGateway` is intentionally excluded from `Journal.slnx`; it is built/run independently via `dotnet` or the scripts wrappers. +- On Windows + Tauri, the sidecar process is spawned with `CREATE_NO_WINDOW` to suppress the console window. diff --git a/devtool.json b/devtool.json new file mode 100644 index 0000000..ff9e98b --- /dev/null +++ b/devtool.json @@ -0,0 +1,335 @@ +{ + "name": "Project Journal", + "version": "0.1.0", + "toolchains": { + "python": { + "executable": "python3.14", + "windowsExecutable": "py", + "launcherVersion": "-3.14", + "venvDir": ".venv", + "pipScript": "scripts/pip-min.ps1", + "profiles": [ + { + "id": "cpu", + "label": "CPU only (default)", + "requirementsFile": "requirements_cpu_only.txt", + "extraIndexUrl": "https://download.pytorch.org/whl/cpu" + }, + { + "id": "gpu", + "label": "GPU / CUDA", + "requirementsFile": "requirements_gpu.txt" + }, + { + "id": "nlp", + "label": "NLP / spaCy (optional)", + "requirementsFile": "requirements_nlp_optional.txt", + "postInstallCommands": [ + "spacy download en_core_web_sm" + ] + } + ] + }, + "node": { + "packageManager": "npm", + "workingDir": "Journal.App" + } + }, + "targets": [ + { + "id": "sidecar", + "label": "Publish Sidecar", + "description": "Build Journal.Sidecar as self-contained exe → output/", + "group": "Build", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/publish-sidecar.ps1", + "-Configuration", + "Release", + "-Runtime", + "win-x64" + ], + "workingDir": ".", + "dependsOn": [] + }, + { + "id": "web", + "label": "Build Web UI", + "description": "Build SvelteKit bundle → Journal.App/build/", + "group": "Build", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/publish-app.ps1", + "-Target", + "web" + ], + "workingDir": ".", + "dependsOn": [] + }, + { + "id": "webgateway", + "label": "Publish WebGateway", + "description": "Publish ASP.NET host with embedded web UI → output/webgateway/", + "group": "Build", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/publish-webgateway.ps1", + "-Configuration", + "Release", + "-Runtime", + "win-x64" + ], + "workingDir": ".", + "dependsOn": [ + "web" + ] + }, + { + "id": "tauri", + "label": "Build Tauri Desktop App", + "description": "Build desktop exe (no installer) → Journal.App/src-tauri/target/release/", + "group": "Build", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/publish-app.ps1", + "-Target", + "tauri", + "-TauriBundles", + "none" + ], + "workingDir": ".", + "dependsOn": [ + "sidecar" + ] + }, + { + "id": "tauri-nsis", + "label": "Build Tauri + NSIS Installer", + "description": "Build desktop exe with NSIS installer package", + "group": "Build", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/publish-app.ps1", + "-Target", + "tauri", + "-TauriBundles", + "nsis" + ], + "workingDir": ".", + "dependsOn": [ + "sidecar" + ] + }, + { + "id": "build-dotnet", + "label": "Build .NET Projects", + "description": "dotnet build — all C# projects in solution", + "group": "Build", + "command": "dotnet", + "args": [ + "build" + ], + "workingDir": ".", + "dependsOn": [] + }, + { + "id": "all", + "label": "Full Release Build ✦", + "description": "Sidecar → Web → WebGateway → Tauri, in dependency order", + "group": "Build", + "command": null, + "args": [], + "workingDir": ".", + "dependsOn": [ + "sidecar", + "web", + "webgateway", + "tauri" + ] + }, + { + "id": "run-gateway", + "label": "Run WebGateway", + "description": "Start HTTP gateway dev server at http://localhost:5180", + "group": "Dev", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/run-webgateway.ps1" + ], + "workingDir": ".", + "dependsOn": [] + }, + { + "id": "test", + "label": "Run Smoke Tests", + "description": "Run all ~80 integration tests in Journal.SmokeTests", + "group": "Test", + "command": "dotnet", + "args": [ + "run", + "--project", + "Journal.SmokeTests/Journal.SmokeTests.csproj" + ], + "workingDir": ".", + "dependsOn": [] + }, + { + "id": "gate", + "label": "Run Migration Gate", + "description": "Full build + smoke tests + parity check", + "group": "Test", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/migration-gate.ps1" + ], + "workingDir": ".", + "dependsOn": [] + }, + { + "id": "nuget-export", + "label": "Export NuGet Cache", + "description": "Prime and export .nuget cache to zip for offline use", + "group": "Cache", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/nuget-export-cache.ps1" + ], + "workingDir": ".", + "dependsOn": [] + }, + { + "id": "nuget-import", + "label": "Import NuGet Cache", + "description": "Import cache zip and validate restore", + "group": "Cache", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/nuget-import-cache.ps1" + ], + "workingDir": ".", + "dependsOn": [] + } + , + { + "id": "npm-clean", + "label": "Clean Node Modules", + "description": "Remove Journal.App node_modules (kills node/tauri first)", + "group": "System", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/npm-clean.ps1" + ], + "workingDir": ".", + "dependsOn": [] + } + , + { + "id": "stage-output", + "label": "Stage Output Bundle", + "description": "Publish sidecar + web + webgateway + tauri, then stage journalapp.exe into output/", + "group": "Build", + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "scripts/publish-output.ps1" + ], + "workingDir": ".", + "dependsOn": [] + } + ], + "env": [ + { + "key": "JOURNAL_AI_PROVIDER", + "description": "AI provider bridge mode", + "default": "none", + "options": [ + "none", + "python-sidecar" + ] + }, + { + "key": "JOURNAL_LOG_LEVEL", + "description": "Log verbosity for C# backend", + "default": "warning", + "options": [ + "trace", + "debug", + "information", + "warning", + "error", + "critical" + ] + }, + { + "key": "JOURNAL_NLP_BACKEND", + "description": "Python NLP backend selection", + "default": "auto", + "options": [ + "auto", + "spacy", + "fallback" + ] + }, + { + "key": "JOURNAL_PROJECT_ROOT", + "description": "Override project root path (blank = auto-detect)", + "default": "", + "options": [] + }, + { + "key": "JOURNAL_VAULT_DIR", + "description": "Override vault directory path", + "default": "", + "options": [] + }, + { + "key": "JOURNAL_DATA_DIR", + "description": "Override decrypted data directory path", + "default": "", + "options": [] + } + ] +} diff --git a/docs/frontend-csharp-backend-wiring.md b/docs/frontend-csharp-backend-wiring.md new file mode 100644 index 0000000..2dd6cce --- /dev/null +++ b/docs/frontend-csharp-backend-wiring.md @@ -0,0 +1,218 @@ +# Wiring Frontend to the C# Backend + +This document explains how to connect the `Journal.App` frontend to the C# backend in this repository. + +## Current Backend Reality + +In this repo today, the C# backend projects in `Journal.slnx` are: + +- `Journal.Core` +- `Journal.Sidecar` +- `Journal.SmokeTests` + +There is currently **no** `Journal.Api` project in the solution file, so the primary integration path is: + +- Frontend (Svelte/Tauri) -> Tauri bridge -> `Journal.Sidecar` (stdin/stdout JSON protocol) + +## Command Protocol (C#) + +`Journal.Core.Entry.HandleCommandAsync` accepts a JSON command envelope and returns: + +- success: `{ "ok": true, "data": ... }` +- failure: `{ "ok": false, "error": "..." }` + +Command model (`Journal.Core/Models/Command.cs`): + +```json +{ + "action": "entries.list", + "correlationId": "optional-string", + "id": "optional", + "type": "optional", + "tag": "optional", + "payload": {} +} +``` + +Useful actions for frontend wiring: + +- `entries.list` +- `entries.load` +- `entries.save` +- `search.entries` +- `vault.load_all` +- `vault.save_current_month` +- `db.status` +- `db.hydrate_workspace` + +## Recommended Integration (Sidecar Bridge) + +Use a small frontend client that sends commands through one bridge function. The bridge can be backed by: + +- a Tauri command that talks to a managed sidecar process, or +- a local HTTP adapter (if you add one). + +### 1. Define shared frontend command/response types + +Create `Journal.App/src/lib/backend/types.ts`: + +```ts +export type BackendCommand = { + action: string; + correlationId?: string; + id?: string; + type?: string; + tag?: string; + payload?: unknown; +}; + +export type BackendOk<T> = { ok: true; data: T }; +export type BackendErr = { ok: false; error: string }; +export type BackendResponse<T> = BackendOk<T> | BackendErr; +``` + +### 2. Create one backend client entrypoint + +Create `Journal.App/src/lib/backend/client.ts`: + +```ts +import { invoke } from "@tauri-apps/api/core"; +import type { BackendCommand, BackendResponse } from "./types"; + +export async function sendCommand<T>(command: BackendCommand): Promise<T> { + const response = await invoke<BackendResponse<T>>("sidecar_command", { command }); + + if (!response.ok) { + throw new Error(response.error || "Backend command failed"); + } + + return response.data; +} +``` + +This keeps all UI code backend-agnostic. + +### 3. Build domain helpers (entries example) + +Create `Journal.App/src/lib/backend/entries.ts`: + +```ts +import { sendCommand } from "./client"; + +export async function listEntries(dataDirectory?: string) { + return sendCommand<string[]>({ + action: "entries.list", + payload: { dataDirectory } + }); +} + +export async function loadEntry(filePath: string) { + return sendCommand<{ filePath: string; content: string; section?: string }>({ + action: "entries.load", + payload: { filePath } + }); +} + +export async function saveEntry(args: { + filePath?: string; + content: string; + title?: string; + section?: string; + date?: string; +}) { + return sendCommand<{ filePath: string }>({ + action: "entries.save", + payload: args + }); +} +``` + +### 4. Use client in UI state + +In page/component code: + +- on panel item click: call `loadEntry(filePath)` +- on editor save button: call `saveEntry({ filePath, content })` +- on app init: call `listEntries()` to populate list + +## Tauri Bridge Notes + +Your frontend should not spawn/process-manage the sidecar directly. Keep that in the Tauri layer. + +Bridge responsibilities: + +- start and keep one sidecar process alive +- write command JSON lines to sidecar stdin +- read stdout lines and map responses by `correlationId` +- return parsed response to frontend +- restart sidecar if it crashes + +If you have not implemented this yet, create one Tauri command such as: + +- `sidecar_command(command)` + +and route all frontend calls through it. + +## Vault/Auth Flow + +Recommended startup sequence: + +1. Prompt for vault password in UI. +2. Call `vault.load_all` (or `db.hydrate_workspace`) once. +3. Backend stores session password (`DatabaseSessionService`) for subsequent commands. +4. Continue with `entries.list`, `entries.load`, etc. + +Do not store raw vault password in long-lived frontend state. + +## Error Handling Pattern + +Always normalize backend errors in one place: + +- backend client throws `Error(message)` when `ok: false` +- UI catches and displays your custom modal +- include `correlationId` on commands for tracing/logging + +## Optional HTTP Path (If You Add Journal.Api) + +If you later add `Journal.Api` with `POST /api/command`, keep the same command envelope and swap transport only: + +- replace `invoke("sidecar_command", ...)` with `fetch("/api/command", ...)` +- keep `sendCommand` interface unchanged + +That lets UI code remain identical. + +## Minimal Next Steps + +1. Add `src/lib/backend/types.ts`, `client.ts`, `entries.ts`. +2. Wire `EditorPanel` save button to `entries.save`. +3. Wire `SidePanel` item load to `entries.load`. +4. Add vault unlock modal + `vault.load_all` on startup. +5. Keep all backend calls behind `sendCommand` only. + +## Frontend Store Architecture (Current) + +Current frontend uses feature stores in `Journal.App/src/lib/stores/`: + +- `entries.ts` -> `entriesStore` +- `fragments.ts` -> `fragmentsStore` +- `todos.ts` -> `todoListsStore`, `todosStore` +- `lists.ts` -> `listsStore` +- `settings.ts` -> `settingsTags`, `settingsFragmentTypes` + +Current pattern is store-first for most feature CRUD and parsing (especially fragments and todos), with UI components invoking store helpers. + +## State/CRUD Gaps Still Needed + +To fully standardize state management: + +1. Move settings add/edit/remove logic into `settings.ts` helper functions (currently in route component code). +2. Add full CRUD helpers for `entries.ts` and `lists.ts` (update/remove/reorder, not only draft creation). +3. Make todo list metadata + todo items update atomically through a single store API wrapper. +4. Move calendar-created entries out of local component state into a dedicated calendar store. +5. Add persistence/hydration strategy between stores and backend (`entries.load/save`, `vault.load_all`, etc.). + +## Recommended Rule + +- Keep all feature data mutations in store helper APIs. +- Keep route/component files focused on view state and command orchestration. +- Keep backend transport (`sendCommand`) separate from pure local store mutation helpers, then compose both in thin feature services. diff --git a/justfile b/justfile new file mode 100644 index 0000000..151bb9f --- /dev/null +++ b/justfile @@ -0,0 +1,105 @@ +# SDT — Project Journal Justfile +# Install just: https://just.systems/man/en/packages.html + +set windows-shell := ["pwsh", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command"] +set shell := ["pwsh", "-c"] + +# Detect runtime from OS +runtime := if os() == "windows" { "win-x64" } else { "linux-x64" } + +# ── Default: list available recipes ──────────────────────────────────────────── +default: + @just --list + +# ── Build ────────────────────────────────────────────────────────────────────── + +# Build Journal.Sidecar as self-contained single-file exe +sidecar: + & ./scripts/publish-sidecar.ps1 -Configuration Release -Runtime {{runtime}} + +# Build SvelteKit web bundle (output: Journal.App/build/) +web: + & ./scripts/publish-app.ps1 -Target web + +# Publish WebGateway with embedded web UI (depends: web) +webgateway: web + & ./scripts/publish-webgateway.ps1 -Configuration Release -Runtime {{runtime}} + +# Build Tauri desktop exe — no installer (depends: sidecar) +tauri: sidecar + & ./scripts/publish-app.ps1 -Target tauri -TauriBundles none + +# Build Tauri with NSIS installer (depends: sidecar) +tauri-nsis: sidecar + & ./scripts/publish-app.ps1 -Target tauri -TauriBundles nsis + +# Build Tauri with MSI installer (depends: sidecar) +tauri-msi: sidecar + & ./scripts/publish-app.ps1 -Target tauri -TauriBundles msi + +# Full release build — everything in correct order +all: sidecar web webgateway tauri + +# ── Dev ──────────────────────────────────────────────────────────────────────── + +# Run WebGateway dev server (http://localhost:5180) +run: + & ./scripts/run-webgateway.ps1 + +# Run WebGateway with pinned project root (avoids multi-clone ambiguity) +run-pinned: + & ./scripts/run-webgateway.ps1 -ProjectRoot {{justfile_directory()}} -Urls http://0.0.0.0:5180 + +# SvelteKit dev server only (http://localhost:1420) +dev-app: + Set-Location Journal.App; npm run dev + +# Tauri dev mode (desktop window + hot reload) +dev-tauri: sidecar + Set-Location Journal.App; npm run tauri dev + +# ── Test ─────────────────────────────────────────────────────────────────────── + +# Run all smoke tests (~80 integration tests) +test: + dotnet run --project Journal.SmokeTests/Journal.SmokeTests.csproj + +# Full migration gate (build + smoke + parity) +gate: + & ./scripts/migration-gate.ps1 + +# Migration gate — skip smoke tests +gate-fast: + & ./scripts/migration-gate.ps1 -SkipSmoke + +# Migration gate — skip API contract tests +gate-no-api: + & ./scripts/migration-gate.ps1 -SkipApi + +# ── .NET ─────────────────────────────────────────────────────────────────────── + +# dotnet build all projects +build: + dotnet build + +# dotnet build with resilient NuGet defaults (use in restricted environments) +build-safe: + & ./scripts/dotnet-min.ps1 build Journal.Core/Journal.Core.csproj + & ./scripts/dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj + & ./scripts/dotnet-min.ps1 build Journal.WebGateway/Journal.WebGateway.csproj + +# ── NuGet Cache ──────────────────────────────────────────────────────────────── + +# Export NuGet cache to zip for offline/transfer use +nuget-export zip="nuget-cache-export.zip": + & ./scripts/nuget-export-cache.ps1 -OutputZip {{zip}} + +# Import NuGet cache zip and validate restore +nuget-import zip="nuget-cache-export.zip": + & ./scripts/nuget-import-cache.ps1 -InputZip {{zip}} + +# ── SDT ──────────────────────────────────────────────────────────────────────── + +# Launch SDT dev tool TUI +sdt: + dotnet run --project Journal.DevTool/Journal.DevTool.csproj diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..1a303e4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "journal", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..997637a --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,328 @@ +# Scripts Reference + +This folder contains PowerShell wrappers for repeatable local development, build, publish, and cache operations. + +## Scope + +These scripts target the repository rooted at `E:\stansshit\csharp\journal-master\journal`. + +## Requirements + +- PowerShell 7+ (`pwsh` recommended) +- .NET SDK (current repo uses `net10.0` targets) +- Python (for `pip-min.ps1`, `migration-gate.ps1`) +- Node.js + npm (for `publish-app.ps1`) + +## Execution Policy + +If script execution is blocked on Windows, run commands with one of: + +```powershell +pwsh -NoProfile -ExecutionPolicy Bypass -File .\scripts\<script>.ps1 +``` + +or in-session: + +```powershell +Set-ExecutionPolicy -Scope Process Bypass +``` + +## Script Overview + +| Script | Purpose | +|---|---| +| `dev-shell.ps1` | Initializes current shell with repo-local .NET/pip/HuggingFace cache env vars. | +| `script-common.ps1` | Shared helper functions used by most scripts. | +| `dotnet-min.ps1` | Minimal `dotnet` wrapper with local NuGet cache and safe defaults. | +| `pip-min.ps1` | Minimal `pip` wrapper with repo-local target/cache and Windows compatibility mapping. | +| `pip_safe.py` | Python wrapper used by `pip-min.ps1` to patch temporary-directory behavior. | +| `publish-app.ps1` | Builds frontend web bundle or Tauri desktop app. | +| `publish-sidecar.ps1` | Publishes `Journal.Sidecar` single-file executable to `output/`. | +| `publish-webgateway.ps1` | Publishes `Journal.WebGateway` and optionally copies web assets into `wwwroot`. | +| `run-webgateway.ps1` | Runs `Journal.WebGateway` with configurable URLs and project root. | +| `migration-gate.ps1` | End-to-end migration/parity gate (build + smoke/parity/API checks). | +| `nuget-export-cache.ps1` | Primes and exports `.nuget` cache to zip for transfer. | +| `nuget-import-cache.ps1` | Imports exported cache zip and validates restore. | + +## Common Patterns Used Across Scripts + +- Proxy cleanup: `Clear-JournalProxyEnv` +- Repo root detection: `Resolve-JournalRepoRoot` +- Repo-local caches: + - `.dotnet_home` + - `.nuget\packages` + - `.nuget\http-cache` + - `.pip\cache` + - `.tmp\*` + - `.npm\cache` + +## Detailed Reference + +### `dev-shell.ps1` + +Dot-source this script to configure your *current shell*. + +```powershell +. .\scripts\dev-shell.ps1 +``` + +What it does: + +- loads `script-common.ps1` +- resolves repo root +- clears proxy env vars +- initializes repo-local .NET, pip, and HuggingFace env vars + +Use this once per shell session before running development commands manually. + +### `script-common.ps1` + +Shared helper functions: + +- `Clear-JournalProxyEnv` +- `Resolve-JournalRepoRoot` +- `Initialize-JournalDotnetEnv` +- `Initialize-JournalPipEnv` +- `Initialize-JournalHuggingFaceEnv` +- `Resolve-JournalSidecarProjectPath` +- `Resolve-JournalAppRoot` +- `Resolve-JournalWebGatewayProjectPath` + +Also supports optional override: + +- `JOURNAL_REPO_ROOT` + +### `dotnet-min.ps1` + +Wrapper around `dotnet` with resilient restore/build defaults. + +Usage: + +```powershell +.\scripts\dotnet-min.ps1 <dotnet args> +``` + +Examples: + +```powershell +.\scripts\dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj +.\scripts\dotnet-min.ps1 restore Journal.WebGateway/Journal.WebGateway.csproj +.\scripts\dotnet-min.ps1 run --project Journal.Sidecar/Journal.Sidecar.csproj +``` + +Behavior: + +- sets repo-local `DOTNET_CLI_HOME` and NuGet cache paths +- clears proxy env vars +- adds for common commands (`restore`, `build`, `run`, `test`, `publish`, `pack`): + - `-p:RestoreIgnoreFailedSources=true` + - `-p:NuGetAudit=false` +- for `restore`, also adds `--ignore-failed-sources` + +### `pip-min.ps1` + +Wrapper around `python -m pip` focused on constrained hosts. + +Usage: + +```powershell +.\scripts\pip-min.ps1 <pip args> +``` + +Examples: + +```powershell +.\scripts\pip-min.ps1 install requests +.\scripts\pip-min.ps1 install --index-url https://pypi.org/simple faster-whisper +``` + +Behavior: + +- initializes repo-local pip cache/temp paths +- clears proxy env vars +- for `install` without target/prefix: + - strips `--user` + - installs into `.pydeps\py314` +- on Windows, maps `pyaudio` to `pyaudiowpatch` +- uses `pip_safe.py` if present + +### `pip_safe.py` + +Compatibility wrapper for pip on some Windows + Python 3.14 setups. + +Behavior: + +- monkey-patches `tempfile.mkdtemp` to create writable temp directories (`0o777`) +- then forwards to pip internal CLI + +### `publish-app.ps1` + +Builds the frontend (`web`) or Tauri desktop app (`tauri`). + +Parameters: + +- `-Target web|tauri` (default `web`) +- `-Configuration Release|Debug` (default `Release`) +- `-TauriBundles none|nsis|msi` (default `none`) +- `-InstallDeps` +- `-SkipInstall` +- `-DryRun` + +Examples: + +```powershell +.\scripts\publish-app.ps1 -Target web +.\scripts\publish-app.ps1 -Target tauri -TauriBundles none +.\scripts\publish-app.ps1 -Target tauri -TauriBundles nsis +``` + +Notes: + +- uses repo-local npm cache/temp paths +- `-TauriBundles none` maps to `tauri build --no-bundle` (raw exe build) +- expected web output: `Journal.App\build` +- expected tauri exe location: `Journal.App\src-tauri\target\release\journalapp.exe` (Release) + +### `publish-sidecar.ps1` + +Publishes `Journal.Sidecar` as a self-contained single-file executable. + +Parameters: + +- `-Configuration` (default `Release`) +- `-Runtime` (default `win-x64`) + +Example: + +```powershell +.\scripts\publish-sidecar.ps1 -Configuration Release -Runtime win-x64 +``` + +Output: + +- `output\Journal.Sidecar.exe` (for Windows runtime) + +### `publish-webgateway.ps1` + +Publishes `Journal.WebGateway` and optionally embeds built web assets. + +Parameters: + +- `-Configuration Release|Debug` (default `Release`) +- `-Runtime` (default `win-x64`) +- `-SelfContained` (switch) +- `-SkipWebAssets` (switch) + +Example: + +```powershell +.\scripts\publish-app.ps1 -Target web +.\scripts\publish-webgateway.ps1 -Configuration Release -Runtime win-x64 +``` + +Output: + +- `output\webgateway\` +- optional `output\webgateway\wwwroot\` from `Journal.App\build` + +### `run-webgateway.ps1` + +Runs `Journal.WebGateway` directly with controlled environment. + +Parameters: + +- `-Configuration Release|Debug` (default `Release`) +- `-Urls` (default `http://0.0.0.0:5180`) +- `-ProjectRoot` (optional; if omitted, repo root) + +Examples: + +```powershell +.\scripts\run-webgateway.ps1 +.\scripts\run-webgateway.ps1 -Urls http://127.0.0.1:5180 +.\scripts\run-webgateway.ps1 -ProjectRoot E:\stansshit\csharp\journal-master\journal +``` + +Notes: + +- sets `JOURNAL_PROJECT_ROOT` for the gateway process +- useful when multiple repo clones exist and you need deterministic data/vault paths + +### `migration-gate.ps1` + +Runs migration quality gate. + +Parameters: + +- `-SkipSmoke` +- `-SkipApi` + +Current behavior: + +1. builds `Journal.Sidecar` +2. optionally runs `Journal.SmokeTests` +3. runs Python parity harness test discovery +4. optionally runs API contract test discovery + +If `tests/` is absent, Python parity and API contract steps are skipped automatically with a clear message — the sidecar build and smoke tests still run. + +### `nuget-export-cache.ps1` + +Primes and exports NuGet cache to zip. + +Parameters: + +- `-OutputZip` (default `nuget-cache-export.zip`) +- `-IncludeDotnetHome` + +Behavior: + +- runs restore for selected projects via `dotnet-min.ps1` +- copies `.nuget` (and optional `.dotnet_home`) to staging +- writes `nuget-cache-manifest.txt` +- outputs zip + +Primes restore for `Journal.Sidecar`, `Journal.WebGateway`, and `Journal.SmokeTests`. + +### `nuget-import-cache.ps1` + +Imports exported cache zip and validates by restore. + +Parameters: + +- `-InputZip` (default `nuget-cache-export.zip`) + +Behavior: + +- extracts zip into repo root +- runs restore for selected projects via `dotnet-min.ps1` + +Validates restore for `Journal.Sidecar`, `Journal.WebGateway`, and `Journal.SmokeTests`. + +## Environment Variables Used + +- `JOURNAL_REPO_ROOT` (optional override for repo detection) +- `JOURNAL_PROJECT_ROOT` (runtime project root for gateway/sidecar config) +- `DOTNET_CLI_HOME` +- `NUGET_PACKAGES` +- `NUGET_HTTP_CACHE_PATH` +- `NUGET_CERT_REVOCATION_MODE` +- `PIP_CACHE_DIR` +- `HF_HOME` +- `HUGGINGFACE_HUB_CACHE` + +## Output and Cache Directories + +- `output/` +- `output/webgateway/` +- `.dotnet_home/` +- `.nuget/packages/` +- `.nuget/http-cache/` +- `.npm/cache/` +- `.pip/cache/` +- `.tmp/` +- `.pydeps/` + +## See Also + +- [`WORKFLOWS.md`](./WORKFLOWS.md) for copy/paste command recipes. diff --git a/scripts/WORKFLOWS.md b/scripts/WORKFLOWS.md new file mode 100644 index 0000000..e3972b4 --- /dev/null +++ b/scripts/WORKFLOWS.md @@ -0,0 +1,140 @@ +# Script Workflows + +Practical command recipes for common tasks. + +## 1) Start a Clean Dev Shell + +```powershell +cd E:\stansshit\csharp\journal-master\journal +. .\scripts\dev-shell.ps1 +``` + +Use this when you want the current shell configured with repo-local cache paths. + +## 2) Build .NET Projects With Safe Defaults + +```powershell +.\scripts\dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj +.\scripts\dotnet-min.ps1 build Journal.WebGateway/Journal.WebGateway.csproj +``` + +## 3) Build Frontend or Desktop App + +Web build: + +```powershell +.\scripts\publish-app.ps1 -Target web +``` + +Tauri raw exe (no installer): + +```powershell +.\scripts\publish-app.ps1 -Target tauri -TauriBundles none +``` + +Tauri installer bundles: + +```powershell +.\scripts\publish-app.ps1 -Target tauri -TauriBundles nsis +.\scripts\publish-app.ps1 -Target tauri -TauriBundles msi +``` + +## 4) Publish Sidecar + +```powershell +.\scripts\publish-sidecar.ps1 -Configuration Release -Runtime win-x64 +``` + +Expected output under `output/`. + +## 5) Publish WebGateway Package + +```powershell +.\scripts\publish-app.ps1 -Target web +.\scripts\publish-webgateway.ps1 -Configuration Release -Runtime win-x64 +``` + +If you only want gateway binary refresh: + +```powershell +.\scripts\publish-webgateway.ps1 -SkipWebAssets +``` + +## 6) Run WebGateway Against Explicit Root + +When multiple clones exist, always pin project root: + +```powershell +.\scripts\run-webgateway.ps1 -ProjectRoot E:\stansshit\csharp\journal-master\journal -Urls http://0.0.0.0:5180 +``` + +Quick health check: + +```powershell +Invoke-RestMethod http://127.0.0.1:5180/api/health +``` + +Inspect active backend config: + +```powershell +$body = @{ action = 'config.get' } | ConvertTo-Json +Invoke-RestMethod -Uri http://127.0.0.1:5180/api/command -Method Post -ContentType 'application/json' -Body $body +``` + +## 7) Python Package Installs in Repo-Local Target + +```powershell +.\scripts\pip-min.ps1 install requests +``` + +Packages go to `.pydeps\py314` unless you pass your own `--target`/`--prefix`. + +## 8) Migration Gate (When Full Test Assets Exist) + +```powershell +.\scripts\migration-gate.ps1 +``` + +Partial run: + +```powershell +.\scripts\migration-gate.ps1 -SkipSmoke -SkipApi +``` + +If `tests/` is absent, Python parity and API contract steps are skipped with a clear message. + +## 9) NuGet Cache Export/Import (Offline-ish Restore) + +Export: + +```powershell +.\scripts\nuget-export-cache.ps1 -OutputZip .\nuget-cache-export.zip +``` + +Import: + +```powershell +.\scripts\nuget-import-cache.ps1 -InputZip .\nuget-cache-export.zip +``` + +Validates restore for `Journal.Sidecar`, `Journal.WebGateway`, and `Journal.SmokeTests`. + +## 10) Quick Troubleshooting + +Script blocked by execution policy: + +```powershell +pwsh -NoProfile -ExecutionPolicy Bypass -File .\scripts\publish-app.ps1 -Target web +``` + +Unexpected data/vault mismatch in WebGateway: + +1. Run with explicit `-ProjectRoot`. +2. Verify with `config.get` via `/api/command`. +3. Verify sidecar root via `/api/sidecar/root`. + +NuGet restore flakiness: + +1. Use `dotnet-min.ps1` wrappers. +2. Confirm proxy vars are cleared (`HTTP_PROXY`, `HTTPS_PROXY`, etc.). +3. Ensure `.nuget` directories are writable. diff --git a/scripts/dev-shell.ps1 b/scripts/dev-shell.ps1 new file mode 100644 index 0000000..eb262d0 --- /dev/null +++ b/scripts/dev-shell.ps1 @@ -0,0 +1,24 @@ +# Run this in PowerShell before development commands: +# . ./scripts/dev-shell.ps1 + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot + +# Clear dead proxy overrides and offline-only pip mode in current shell. +Clear-JournalProxyEnv + +# Keep .NET artifacts local to repo to avoid restricted user-profile paths. +Initialize-JournalDotnetEnv -RepoRoot $repoRoot + +# Keep pip artifacts local to repo. +Initialize-JournalPipEnv -RepoRoot $repoRoot + +# Keep Hugging Face cache local and silence symlink-only warning on Windows. +Initialize-JournalHuggingFaceEnv -RepoRoot $repoRoot + +Write-Host "Development shell initialized for repo-local dotnet/pip paths at: $repoRoot" diff --git a/scripts/dotnet-min.ps1 b/scripts/dotnet-min.ps1 new file mode 100644 index 0000000..9b36e3b --- /dev/null +++ b/scripts/dotnet-min.ps1 @@ -0,0 +1,62 @@ +param( + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$DotnetArgs +) + +$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path + +# Keep dotnet and NuGet artifacts local to the repo for easy cleanup. +$env:DOTNET_CLI_HOME = Join-Path $repoRoot ".dotnet_home" +$env:NUGET_PACKAGES = Join-Path $repoRoot ".nuget\packages" +$env:NUGET_HTTP_CACHE_PATH = Join-Path $repoRoot ".nuget\http-cache" + +# Keep setup minimal and non-interactive. +$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "1" +$env:DOTNET_ADD_GLOBAL_TOOLS_TO_PATH = "0" +$env:DOTNET_GENERATE_ASPNET_CERTIFICATE = "0" +$env:DOTNET_CLI_TELEMETRY_OPTOUT = "1" + +# Clear proxy env vars for this process. The host machine currently points them +# to 127.0.0.1:9, which breaks NuGet restore. +Remove-Item Env:HTTP_PROXY -ErrorAction SilentlyContinue +Remove-Item Env:HTTPS_PROXY -ErrorAction SilentlyContinue +Remove-Item Env:ALL_PROXY -ErrorAction SilentlyContinue +Remove-Item Env:http_proxy -ErrorAction SilentlyContinue +Remove-Item Env:https_proxy -ErrorAction SilentlyContinue +Remove-Item Env:all_proxy -ErrorAction SilentlyContinue +Remove-Item Env:GIT_HTTP_PROXY -ErrorAction SilentlyContinue +Remove-Item Env:GIT_HTTPS_PROXY -ErrorAction SilentlyContinue + +# Prefer offline cert revocation checks to reduce flaky TLS behavior on constrained hosts. +$env:NUGET_CERT_REVOCATION_MODE = "offline" + +New-Item -ItemType Directory -Force -Path $env:DOTNET_CLI_HOME | Out-Null +New-Item -ItemType Directory -Force -Path $env:NUGET_PACKAGES | Out-Null +New-Item -ItemType Directory -Force -Path $env:NUGET_HTTP_CACHE_PATH | Out-Null + +if (-not $DotnetArgs -or $DotnetArgs.Count -eq 0) { + Write-Host "Usage: ./scripts/dotnet-min.ps1 <dotnet args>" + Write-Host "Example: ./scripts/dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj" + exit 2 +} + +$firstArg = $DotnetArgs[0].ToLowerInvariant() +$effectiveArgs = @($DotnetArgs) + +if ($firstArg -in @("restore", "build", "run", "test", "publish", "pack")) { + if (-not ($effectiveArgs -contains "-p:RestoreIgnoreFailedSources=true")) { + $effectiveArgs += "-p:RestoreIgnoreFailedSources=true" + } + if (-not ($effectiveArgs -contains "-p:NuGetAudit=false")) { + $effectiveArgs += "-p:NuGetAudit=false" + } +} + +if ($firstArg -eq "restore") { + if (-not ($effectiveArgs -contains "--ignore-failed-sources")) { + $effectiveArgs += "--ignore-failed-sources" + } +} + +& dotnet @effectiveArgs +exit $LASTEXITCODE diff --git a/scripts/migration-gate.ps1 b/scripts/migration-gate.ps1 new file mode 100644 index 0000000..c0d2e09 --- /dev/null +++ b/scripts/migration-gate.ps1 @@ -0,0 +1,57 @@ +param( + [switch]$SkipSmoke, + [switch]$SkipApi +) + +$ErrorActionPreference = "Stop" +$repoRoot = Split-Path -Parent $PSScriptRoot +$parityReport = Join-Path $repoRoot "logs\parity_harness_results.json" + +Write-Host "migration-gate: repo root = $repoRoot" + +Push-Location $repoRoot +try { + Write-Host "migration-gate: building sidecar binary..." + & "$repoRoot\scripts\dotnet-min.ps1" build Journal.Sidecar/Journal.Sidecar.csproj + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + + if (-not $SkipSmoke) { + Write-Host "migration-gate: running csharp smoke tests..." + & "$repoRoot\scripts\dotnet-min.ps1" run --project Journal.SmokeTests/Journal.SmokeTests.csproj + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + } + else { + Write-Host "migration-gate: skipping smoke tests (--SkipSmoke)." + } + + Write-Host "migration-gate: running parity harness + fixture matrix..." + $testsDir = Join-Path $repoRoot "tests" + if (Test-Path $testsDir) { + $env:PARITY_HARNESS_REPORT = $parityReport + & python -m unittest discover -s tests -p "test_parity_harness.py" -v + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + } + else { + Write-Host "migration-gate: skipping parity harness — tests/ directory not found." + } + + if (-not $SkipApi) { + Write-Host "migration-gate: running API contract tests..." + if (Test-Path $testsDir) { + & python -m unittest discover -s tests -p "test_api_contract.py" -v + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + } + else { + Write-Host "migration-gate: skipping API contract tests — tests/ directory not found." + } + } + else { + Write-Host "migration-gate: skipping API contract tests (--SkipApi)." + } + + Write-Host "migration-gate: PASS" + Write-Host "migration-gate: parity report => $parityReport" +} +finally { + Pop-Location +} diff --git a/scripts/npm-clean.ps1 b/scripts/npm-clean.ps1 new file mode 100644 index 0000000..ce838cd --- /dev/null +++ b/scripts/npm-clean.ps1 @@ -0,0 +1,62 @@ +param( + [switch]$RemoveLockfile, + [switch]$Force +) + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot +$appRoot = Resolve-JournalAppRoot -RepoRoot $repoRoot + +Write-Host "Cleaning npm artifacts for Journal.App" -ForegroundColor Cyan +Write-Host "Using app root: $appRoot" -ForegroundColor DarkGray + +$processNames = @("node", "journalapp", "tauri") +Get-Process -ErrorAction SilentlyContinue | + Where-Object { $processNames -contains $_.ProcessName } | + ForEach-Object { + try { + Stop-Process -Id $_.Id -Force -ErrorAction Stop + Write-Host "Stopped process: $($_.ProcessName) ($($_.Id))" -ForegroundColor DarkGray + } + catch { + Write-Warning "Failed to stop process $($_.ProcessName) ($($_.Id)): $($_.Exception.Message)" + } + } + +Push-Location $appRoot +try { + $nodeModulesPath = Join-Path $appRoot "node_modules" + $lockfilePath = Join-Path $appRoot "package-lock.json" + + if (Test-Path $nodeModulesPath) { + if (-not $Force) { + Write-Host "Removing node_modules (use -Force to suppress prompt)..." -ForegroundColor Yellow + } + Remove-Item -Recurse -Force $nodeModulesPath + Write-Host "Removed node_modules." -ForegroundColor Green + } + else { + Write-Host "node_modules not found; nothing to remove." -ForegroundColor DarkGray + } + + if ($RemoveLockfile) { + if (Test-Path $lockfilePath) { + Remove-Item -Force $lockfilePath + Write-Host "Removed package-lock.json." -ForegroundColor Green + } + else { + Write-Host "package-lock.json not found; nothing to remove." -ForegroundColor DarkGray + } + } + else { + Write-Host "Keeping package-lock.json (pass -RemoveLockfile to delete)." -ForegroundColor DarkGray + } +} +finally { + Pop-Location +} diff --git a/scripts/nuget-export-cache.ps1 b/scripts/nuget-export-cache.ps1 new file mode 100644 index 0000000..bee1a64 --- /dev/null +++ b/scripts/nuget-export-cache.ps1 @@ -0,0 +1,57 @@ +param( + [string]$OutputZip = "nuget-cache-export.zip", + [switch]$IncludeDotnetHome +) + +$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path +$outputPath = if ([System.IO.Path]::IsPathRooted($OutputZip)) { $OutputZip } else { Join-Path $repoRoot $OutputZip } +$outputDir = Split-Path -Parent $outputPath +if (-not (Test-Path $outputDir)) { + New-Item -ItemType Directory -Force -Path $outputDir | Out-Null +} + +Write-Host "Priming restore cache..." +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.Sidecar/Journal.Sidecar.csproj" +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.WebGateway/Journal.WebGateway.csproj" +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.SmokeTests/Journal.SmokeTests.csproj" +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +$staging = Join-Path $repoRoot ".nuget-export-staging" +if (Test-Path $staging) { + Remove-Item -Recurse -Force $staging +} +New-Item -ItemType Directory -Force -Path $staging | Out-Null + +$nugetRoot = Join-Path $repoRoot ".nuget" +if (-not (Test-Path $nugetRoot)) { + Write-Error "No .nuget directory found under $repoRoot" + exit 1 +} + +Copy-Item -Recurse -Force -Path $nugetRoot -Destination (Join-Path $staging ".nuget") +if ($IncludeDotnetHome) { + $dotnetHome = Join-Path $repoRoot ".dotnet_home" + if (Test-Path $dotnetHome) { + Copy-Item -Recurse -Force -Path $dotnetHome -Destination (Join-Path $staging ".dotnet_home") + } +} + +$manifest = @( + "exported_utc=$([DateTime]::UtcNow.ToString("o"))" + "repo_root=$repoRoot" + "include_dotnet_home=$($IncludeDotnetHome.IsPresent)" + "note=Copy this zip to target machine and run scripts/nuget-import-cache.ps1" +) +$manifest | Set-Content -Encoding UTF8 -Path (Join-Path $staging "nuget-cache-manifest.txt") + +if (Test-Path $outputPath) { + Remove-Item -Force $outputPath +} + +Compress-Archive -Path (Join-Path $staging "*") -DestinationPath $outputPath -Force +Remove-Item -Recurse -Force $staging + +Write-Host "NuGet cache export created at: $outputPath" + diff --git a/scripts/nuget-import-cache.ps1 b/scripts/nuget-import-cache.ps1 new file mode 100644 index 0000000..dad8f04 --- /dev/null +++ b/scripts/nuget-import-cache.ps1 @@ -0,0 +1,25 @@ +param( + [string]$InputZip = "nuget-cache-export.zip" +) + +$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path +$inputPath = if ([System.IO.Path]::IsPathRooted($InputZip)) { $InputZip } else { Join-Path $repoRoot $InputZip } + +if (-not (Test-Path $inputPath)) { + Write-Error "Input zip not found: $inputPath" + exit 1 +} + +Write-Host "Importing cache from: $inputPath" +Expand-Archive -Path $inputPath -DestinationPath $repoRoot -Force + +Write-Host "Running restore with local cache..." +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.Sidecar/Journal.Sidecar.csproj" +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.WebGateway/Journal.WebGateway.csproj" +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.SmokeTests/Journal.SmokeTests.csproj" +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +Write-Host "Cache import complete." + diff --git a/scripts/pip-min.ps1 b/scripts/pip-min.ps1 new file mode 100644 index 0000000..6bf7f2c --- /dev/null +++ b/scripts/pip-min.ps1 @@ -0,0 +1,56 @@ +param( + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$PipArgs +) + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot + +Initialize-JournalPipEnv -RepoRoot $repoRoot +Clear-JournalProxyEnv + +if (-not $PipArgs -or $PipArgs.Count -eq 0) { + Write-Host "Usage: ./scripts/pip-min.ps1 <pip args>" + Write-Host "Example: ./scripts/pip-min.ps1 install --index-url https://pypi.org/simple faster-whisper" + exit 2 +} + +# Default install target to a repo-local directory so installs do not require +# user/site-packages write access on constrained hosts. +$effectiveArgs = @($PipArgs) +$firstArg = $effectiveArgs[0].ToLowerInvariant() +if ($firstArg -eq "install") { + # On Windows, map PyAudio to pyaudiowpatch (wheel available for newer CPython), + # avoiding source builds that require PortAudio headers/toolchain wiring. + for ($i = 0; $i -lt $effectiveArgs.Count; $i++) { + $arg = $effectiveArgs[$i] + if ($arg -match '^(?i)pyaudio($|[<>=!~].*)') { + $suffix = $arg.Substring(7) + $effectiveArgs[$i] = "pyaudiowpatch$suffix" + Write-Host "pip-min: mapped '$arg' -> '$($effectiveArgs[$i])' on Windows." + } + } + + $hasTarget = $effectiveArgs -contains "--target" -or $effectiveArgs -contains "-t" -or $effectiveArgs -contains "--prefix" + if (-not $hasTarget) { + $effectiveArgs = $effectiveArgs | Where-Object { $_ -ne "--user" } + $localTarget = Join-Path $repoRoot ".pydeps\py314" + New-Item -ItemType Directory -Force -Path $localTarget | Out-Null + $effectiveArgs += @("--target", $localTarget) + Write-Host "pip-min: using local target $localTarget" + } +} + +$pipWrapper = Join-Path $PSScriptRoot "pip_safe.py" +if (Test-Path $pipWrapper) { + & python $pipWrapper @effectiveArgs +} +else { + & python -m pip @effectiveArgs +} +exit $LASTEXITCODE diff --git a/scripts/pip_safe.py b/scripts/pip_safe.py new file mode 100644 index 0000000..a02a307 --- /dev/null +++ b/scripts/pip_safe.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +import os +import tempfile +from typing import Callable + + +def _mkdtemp_compat( + suffix: str | None = None, + prefix: str | None = None, + dir: str | None = None, +) -> str: + # Python 3.14 on some Windows hosts creates mkdtemp dirs that are + # immediately non-writable by the same process when mode=0o700 is used. + # pip relies heavily on tempfile; force 0o777 for compatibility. + if dir is None: + dir = tempfile.gettempdir() + if prefix is None: + prefix = tempfile.template + if suffix is None: + suffix = "" + + names = tempfile._get_candidate_names() + for _ in range(tempfile.TMP_MAX): + name = next(names) + path = os.path.join(dir, f"{prefix}{name}{suffix}") + try: + os.mkdir(path, 0o777) + return path + except FileExistsError: + continue + + raise FileExistsError("No usable temporary directory name found.") + + +def main(argv: list[str]) -> int: + tempfile.mkdtemp = _mkdtemp_compat # type: ignore[assignment] + + from pip._internal.cli.main import main as pip_main + + return int(pip_main(argv)) + + +if __name__ == "__main__": + raise SystemExit(main(__import__("sys").argv[1:])) + diff --git a/scripts/publish-app.ps1 b/scripts/publish-app.ps1 new file mode 100644 index 0000000..7d3a783 --- /dev/null +++ b/scripts/publish-app.ps1 @@ -0,0 +1,216 @@ +param( + [ValidateSet("web", "tauri")] + [string]$Target = "web", + [ValidateSet("Release", "Debug")] + [string]$Configuration = "Release", + [ValidateSet("none", "nsis", "msi")] + [string]$TauriBundles = "none", + [switch]$InstallDeps, + [switch]$SkipInstall, + [switch]$DryRun +) + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot +$appRoot = Resolve-JournalAppRoot -RepoRoot $repoRoot + +Clear-JournalProxyEnv + +# Keep npm cache and temp local to the repo. +$npmCacheDir = Join-Path $repoRoot ".npm\cache" +$npmTempDir = Join-Path $repoRoot ".tmp\npm-temp" +New-Item -ItemType Directory -Force -Path $npmCacheDir, $npmTempDir | Out-Null +$env:npm_config_cache = $npmCacheDir +$env:npm_config_update_notifier = "false" +$env:npm_config_fund = "false" +$env:npm_config_audit = "false" +$env:npm_config_offline = "false" +$env:npm_config_prefer_offline = "false" +$env:npm_config_prefer_online = "true" +$env:TEMP = $npmTempDir +$env:TMP = $npmTempDir + +if (-not (Get-Command npm -ErrorAction SilentlyContinue)) { + throw "npm is required but was not found in PATH." +} + +$nodeModulesPath = Join-Path $appRoot "node_modules" +$packageJsonPath = Join-Path $appRoot "package.json" +$packageLockPath = Join-Path $appRoot "package-lock.json" +$depsHashPath = Join-Path $appRoot "node_modules\.journal-deps.sha256" + +function Get-JournalNodeDepsHash { + param( + [Parameter(Mandatory = $true)] + [string[]]$Paths + ) + + $hashLines = foreach ($path in $Paths) { + if (-not (Test-Path $path)) { + continue + } + (Get-FileHash -Algorithm SHA256 -Path $path).Hash + } + return ($hashLines -join "`n").Trim() +} + +$hashInputs = @() +if (Test-Path $packageJsonPath) { + $hashInputs += $packageJsonPath +} +if (Test-Path $packageLockPath) { + $hashInputs += $packageLockPath +} +if ($hashInputs.Count -eq 0) { + throw "package.json not found under $appRoot." +} + +$expectedDepsHash = Get-JournalNodeDepsHash -Paths $hashInputs +$shouldInstall = $InstallDeps -or (-not (Test-Path $nodeModulesPath)) +$installReason = $null + +if (-not $shouldInstall -and -not $SkipInstall) { + if (-not (Test-Path $depsHashPath)) { + $shouldInstall = $true + $installReason = "dependency hash missing" + } + else { + $currentDepsHash = (Get-Content $depsHashPath -Raw).Trim() + if ($currentDepsHash -ne $expectedDepsHash) { + $shouldInstall = $true + $installReason = "package.json/lockfile changed" + } + } +} + +if ($SkipInstall) { + $shouldInstall = $false + if ($installReason) { + Write-Host "SkipInstall set; dependencies may be stale ($installReason)." -ForegroundColor Yellow + } +} + +Write-Host "Building Journal.App target '$Target' ($Configuration)..." -ForegroundColor Cyan +Write-Host "Using app root: $appRoot" -ForegroundColor DarkGray + +Push-Location $appRoot +try { + if ($shouldInstall) { + $installArgs = if (Test-Path $packageLockPath) { + @("ci", "--no-audit", "--fund=false") + } + else { + @("install", "--no-audit", "--fund=false") + } + + if ($installReason) { + Write-Host "Dependencies changed ($installReason). Installing..." -ForegroundColor Yellow + } + + Write-Host "> npm $($installArgs -join ' ')" -ForegroundColor DarkGray + if (-not $DryRun) { + & npm @installArgs + if ($LASTEXITCODE -ne 0) { + throw "Dependency install failed with exit code $LASTEXITCODE." + } + + $depsDir = Split-Path $depsHashPath -Parent + if (-not (Test-Path $depsDir)) { + New-Item -ItemType Directory -Force -Path $depsDir | Out-Null + } + $expectedDepsHash | Set-Content -Path $depsHashPath -NoNewline + } + } + else { + Write-Host "Skipping dependency install (node_modules present and deps unchanged)." -ForegroundColor DarkGray + } + + if ($Target -eq "web") { + $buildArgs = @("run", "build") + Write-Host "> npm $($buildArgs -join ' ')" -ForegroundColor DarkGray + if (-not $DryRun) { + & npm @buildArgs + if ($LASTEXITCODE -ne 0) { + throw "Frontend build failed with exit code $LASTEXITCODE." + } + } + + $outputPath = Join-Path $appRoot "build" + if ($DryRun) { + Write-Host "`nDry run complete (no commands executed)." -ForegroundColor Yellow + Write-Host "Expected output: $outputPath" -ForegroundColor Gray + } + else { + Write-Host "`nFrontend build successful." -ForegroundColor Green + Write-Host "Output: $outputPath" -ForegroundColor Gray + } + } + else { + $tauriArgs = @("run", "tauri", "build") + $tauriCliArgs = @() + if ($TauriBundles -eq "none") { + $tauriCliArgs += "--no-bundle" + } + else { + $tauriCliArgs += @("--bundles", $TauriBundles) + } + if ($Configuration -eq "Debug") { + $tauriCliArgs += "--debug" + } + if ($tauriCliArgs.Count -gt 0) { + $tauriArgs += "--" + $tauriArgs += $tauriCliArgs + } + + Write-Host "> npm $($tauriArgs -join ' ')" -ForegroundColor DarkGray + if (-not $DryRun) { + & npm @tauriArgs + if ($LASTEXITCODE -ne 0) { + throw "Tauri build failed with exit code $LASTEXITCODE." + } + } + + $targetConfigDir = if ($Configuration -eq "Debug") { "debug" } else { "release" } + $tauriTargetPath = Join-Path $appRoot "src-tauri\target" + $rawExePath = Join-Path $tauriTargetPath "$targetConfigDir\journalapp.exe" + if ($DryRun) { + Write-Host "`nDry run complete (no commands executed)." -ForegroundColor Yellow + if ($TauriBundles -eq "none") { + Write-Host "Expected executable: $rawExePath" -ForegroundColor Gray + } + else { + Write-Host "Expected output root: $tauriTargetPath" -ForegroundColor Gray + } + } + else { + Write-Host "`nTauri build successful." -ForegroundColor Green + if ($TauriBundles -eq "none") { + if (Test-Path $rawExePath) { + Write-Host "Executable location: $rawExePath" -ForegroundColor Gray + } + else { + $exeCandidates = Get-ChildItem -Path (Join-Path $tauriTargetPath $targetConfigDir) -File -Filter *.exe -ErrorAction SilentlyContinue | + Sort-Object LastWriteTime -Descending + if ($exeCandidates -and $exeCandidates.Count -gt 0) { + Write-Host "Executable location: $($exeCandidates[0].FullName)" -ForegroundColor Gray + } + else { + Write-Host "Output root: $tauriTargetPath" -ForegroundColor Gray + } + } + } + else { + Write-Host "Output root: $tauriTargetPath" -ForegroundColor Gray + } + } + } +} +finally { + Pop-Location +} + diff --git a/scripts/publish-output.ps1 b/scripts/publish-output.ps1 new file mode 100644 index 0000000..29663f6 --- /dev/null +++ b/scripts/publish-output.ps1 @@ -0,0 +1,103 @@ +param( + [ValidateSet("Release", "Debug")] + [string]$Configuration = "Release", + [string]$Runtime = "win-x64", + [switch]$SkipSidecar, + [switch]$SkipWeb, + [switch]$SkipWebGateway, + [switch]$SkipTauri, + [switch]$DryRun +) + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot +$appRoot = Resolve-JournalAppRoot -RepoRoot $repoRoot +$outputRoot = Join-Path $repoRoot "output" + +$publishSidecar = Join-Path $PSScriptRoot "publish-sidecar.ps1" +$publishApp = Join-Path $PSScriptRoot "publish-app.ps1" +$publishGateway = Join-Path $PSScriptRoot "publish-webgateway.ps1" + +Write-Host "Publishing all outputs to: $outputRoot" -ForegroundColor Cyan +Write-Host "Configuration: $Configuration Runtime: $Runtime" -ForegroundColor DarkGray + +if (-not (Test-Path $outputRoot)) { + New-Item -ItemType Directory -Force -Path $outputRoot | Out-Null +} + +function Invoke-Step { + param( + [string]$Label, + [string]$ScriptPath, + [string[]]$Args + ) + + Write-Host "`n> $Label" -ForegroundColor Cyan + Write-Host " $ScriptPath $($Args -join ' ')" -ForegroundColor DarkGray + if (-not $DryRun) { + & $ScriptPath @Args + } +} + +if (-not $SkipSidecar) { + Invoke-Step "Publish Sidecar" $publishSidecar @( + "-Configuration", $Configuration, + "-Runtime", $Runtime + ) +} +else { + Write-Host "Skipping sidecar publish." -ForegroundColor DarkGray +} + +if (-not $SkipWeb) { + Invoke-Step "Build Web UI" $publishApp @( + "-Target", "web", + "-Configuration", $Configuration + ) +} +else { + Write-Host "Skipping web build." -ForegroundColor DarkGray +} + +if (-not $SkipWebGateway) { + Invoke-Step "Publish WebGateway" $publishGateway @( + "-Configuration", $Configuration, + "-Runtime", $Runtime + ) +} +else { + Write-Host "Skipping WebGateway publish." -ForegroundColor DarkGray +} + +if (-not $SkipTauri) { + Invoke-Step "Build Tauri Desktop App" $publishApp @( + "-Target", "tauri", + "-Configuration", $Configuration, + "-TauriBundles", "none" + ) + + $targetConfigDir = if ($Configuration -eq "Debug") { "debug" } else { "release" } + $tauriExePath = Join-Path $appRoot "src-tauri\\target\\$targetConfigDir\\journalapp.exe" + $stagedExePath = Join-Path $outputRoot "journalapp.exe" + + if (Test-Path $tauriExePath) { + if ($DryRun) { + Write-Host "Would copy: $tauriExePath -> $stagedExePath" -ForegroundColor Yellow + } + else { + Copy-Item -Force $tauriExePath $stagedExePath + Write-Host "Staged desktop exe: $stagedExePath" -ForegroundColor Green + } + } + else { + Write-Warning "Tauri exe not found at $tauriExePath" + } +} +else { + Write-Host "Skipping Tauri build." -ForegroundColor DarkGray +} diff --git a/scripts/publish-sidecar.ps1 b/scripts/publish-sidecar.ps1 new file mode 100644 index 0000000..ab2a855 --- /dev/null +++ b/scripts/publish-sidecar.ps1 @@ -0,0 +1,54 @@ +param( + [string]$Configuration = "Release", + [string]$Runtime = "win-x64" +) + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot +$csproj = Resolve-JournalSidecarProjectPath -RepoRoot $repoRoot +$outputDir = Join-Path $repoRoot "output" + +# Setup local dotnet environment (matches dotnet-min.ps1 logic) +Clear-JournalProxyEnv +Initialize-JournalDotnetEnv -RepoRoot $repoRoot + +Write-Host "Publishing Journal.Sidecar ($Configuration, $Runtime)..." -ForegroundColor Cyan +Write-Host "Using project: $csproj" -ForegroundColor DarkGray + +$publishArgs = @( + "publish", $csproj, + "-c", $Configuration, + "-r", $Runtime, + "--self-contained", + "-p:PublishSingleFile=true", + "-p:IncludeNativeLibrariesForSelfExtract=true", + "-p:RestoreIgnoreFailedSources=true", + "-p:NuGetAudit=false", + "-o", $outputDir +) + +& dotnet @publishArgs + +if ($LASTEXITCODE -eq 0) { + $binaryName = [System.IO.Path]::GetFileNameWithoutExtension($csproj) + $isWindowsRuntime = $Runtime -like "win-*" + $binaryFile = if ($isWindowsRuntime) { "$binaryName.exe" } else { $binaryName } + $binaryPath = Join-Path $outputDir $binaryFile + + Write-Host "`nPublish successful!" -ForegroundColor Green + if (Test-Path $binaryPath) { + Write-Host "Executable location: $binaryPath" -ForegroundColor Gray + } + else { + Write-Host "Output directory: $outputDir" -ForegroundColor Gray + } +} +else { + Write-Host "`nPublish failed with exit code $LASTEXITCODE" -ForegroundColor Red + exit $LASTEXITCODE +} diff --git a/scripts/publish-webgateway.ps1 b/scripts/publish-webgateway.ps1 new file mode 100644 index 0000000..b3e3322 --- /dev/null +++ b/scripts/publish-webgateway.ps1 @@ -0,0 +1,55 @@ +param( + [ValidateSet("Release", "Debug")] + [string]$Configuration = "Release", + [string]$Runtime = "win-x64", + [switch]$SelfContained, + [switch]$SkipWebAssets +) + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot +$gatewayProject = Resolve-JournalWebGatewayProjectPath -RepoRoot $repoRoot +$outputDir = Join-Path $repoRoot "output\webgateway" +$webBuildDir = Join-Path $repoRoot "Journal.App\build" +$webOutputDir = Join-Path $outputDir "wwwroot" + +Clear-JournalProxyEnv +Initialize-JournalDotnetEnv -RepoRoot $repoRoot + +Write-Host "Publishing Journal.WebGateway ($Configuration, $Runtime)..." -ForegroundColor Cyan +Write-Host "Project: $gatewayProject" -ForegroundColor DarkGray + +$publishArgs = @( + "publish", $gatewayProject, + "-c", $Configuration, + "-r", $Runtime, + "--self-contained", ($SelfContained.IsPresent.ToString().ToLowerInvariant()), + "-p:RestoreIgnoreFailedSources=true", + "-p:NuGetAudit=false", + "-o", $outputDir +) + +& dotnet @publishArgs +if ($LASTEXITCODE -ne 0) { + Write-Host "`nPublish failed with exit code $LASTEXITCODE" -ForegroundColor Red + exit $LASTEXITCODE +} + +if (-not $SkipWebAssets) { + if (Test-Path $webBuildDir) { + New-Item -ItemType Directory -Force -Path $webOutputDir | Out-Null + Copy-Item -Path (Join-Path $webBuildDir "*") -Destination $webOutputDir -Recurse -Force + Write-Host "Copied web assets to: $webOutputDir" -ForegroundColor Gray + } + else { + Write-Warning "Journal.App build output not found at $webBuildDir. Run ./scripts/publish-app.ps1 -Target web first." + } +} + +Write-Host "`nPublish successful." -ForegroundColor Green +Write-Host "Output directory: $outputDir" -ForegroundColor Gray diff --git a/scripts/run-webgateway.ps1 b/scripts/run-webgateway.ps1 new file mode 100644 index 0000000..eb2c6d6 --- /dev/null +++ b/scripts/run-webgateway.ps1 @@ -0,0 +1,48 @@ +param( + [ValidateSet("Release", "Debug")] + [string]$Configuration = "Release", + [string]$Urls = "http://0.0.0.0:5180", + [string]$ProjectRoot +) + +$commonScript = Join-Path $PSScriptRoot "script-common.ps1" +if (-not (Test-Path $commonScript)) { + throw "Missing helper script: $commonScript" +} +. $commonScript + +$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot +$gatewayProject = Resolve-JournalWebGatewayProjectPath -RepoRoot $repoRoot + +$effectiveProjectRoot = if ([string]::IsNullOrWhiteSpace($ProjectRoot)) { + $repoRoot +} +else { + [System.IO.Path]::GetFullPath($ProjectRoot) +} + +if (-not (Test-Path $effectiveProjectRoot)) { + throw "ProjectRoot does not exist: $effectiveProjectRoot" +} + +Clear-JournalProxyEnv +Initialize-JournalDotnetEnv -RepoRoot $repoRoot +$env:JOURNAL_PROJECT_ROOT = $effectiveProjectRoot + +Write-Host "Running Journal.WebGateway ($Configuration)..." -ForegroundColor Cyan +Write-Host "Project: $gatewayProject" -ForegroundColor DarkGray +Write-Host "URLs: $Urls" -ForegroundColor DarkGray +Write-Host "JOURNAL_PROJECT_ROOT: $effectiveProjectRoot" -ForegroundColor DarkGray + +$runArgs = @( + "run", + "--project", $gatewayProject, + "-c", $Configuration, + "--no-launch-profile", + "--urls", $Urls, + "-p:RestoreIgnoreFailedSources=true", + "-p:NuGetAudit=false" +) + +& dotnet @runArgs +exit $LASTEXITCODE diff --git a/scripts/script-common.ps1 b/scripts/script-common.ps1 new file mode 100644 index 0000000..eda3a90 --- /dev/null +++ b/scripts/script-common.ps1 @@ -0,0 +1,240 @@ +function Clear-JournalProxyEnv { + # Clear proxy/no-index env vars that commonly break package restore. + Remove-Item Env:HTTP_PROXY -ErrorAction SilentlyContinue + Remove-Item Env:HTTPS_PROXY -ErrorAction SilentlyContinue + Remove-Item Env:ALL_PROXY -ErrorAction SilentlyContinue + Remove-Item Env:http_proxy -ErrorAction SilentlyContinue + Remove-Item Env:https_proxy -ErrorAction SilentlyContinue + Remove-Item Env:all_proxy -ErrorAction SilentlyContinue + Remove-Item Env:GIT_HTTP_PROXY -ErrorAction SilentlyContinue + Remove-Item Env:GIT_HTTPS_PROXY -ErrorAction SilentlyContinue + Remove-Item Env:PIP_NO_INDEX -ErrorAction SilentlyContinue +} + +function Test-JournalRepoRootCandidate { + param( + [string]$Path + ) + + if ([string]::IsNullOrWhiteSpace($Path)) { + return $false + } + + $markers = @( + "Journal.slnx", + "scripts\dev-shell.ps1", + "Journal.Sidecar\Journal.Sidecar.csproj" + ) + + foreach ($marker in $markers) { + if (Test-Path (Join-Path $Path $marker)) { + return $true + } + } + + return $false +} + +function Resolve-JournalRepoRoot { + param( + [string]$StartPath + ) + + $candidateStarts = @() + if (-not [string]::IsNullOrWhiteSpace($StartPath)) { + $candidateStarts += $StartPath + } + + $currentPath = (Get-Location).Path + if (-not [string]::IsNullOrWhiteSpace($currentPath) -and ($candidateStarts -notcontains $currentPath)) { + $candidateStarts += $currentPath + } + + $override = $env:JOURNAL_REPO_ROOT + if (-not [string]::IsNullOrWhiteSpace($override)) { + $overridePath = [System.IO.Path]::GetFullPath($override) + if (Test-JournalRepoRootCandidate -Path $overridePath) { + return $overridePath + } + Write-Warning "JOURNAL_REPO_ROOT is set but does not look like this repo: $overridePath" + } + + if (Get-Command git -ErrorAction SilentlyContinue) { + foreach ($start in $candidateStarts) { + try { + $gitRoot = & git -C $start rev-parse --show-toplevel 2>$null + if ($? -and -not [string]::IsNullOrWhiteSpace($gitRoot)) { + $gitRootPath = [System.IO.Path]::GetFullPath($gitRoot.Trim()) + if (Test-JournalRepoRootCandidate -Path $gitRootPath) { + return $gitRootPath + } + } + } + catch { + } + } + } + + foreach ($start in $candidateStarts) { + $cursor = [System.IO.Path]::GetFullPath($start) + while (-not [string]::IsNullOrWhiteSpace($cursor)) { + if (Test-JournalRepoRootCandidate -Path $cursor) { + return $cursor + } + + $parent = [System.IO.Directory]::GetParent($cursor) + if ($null -eq $parent) { + break + } + + if ($parent.FullName -eq $cursor) { + break + } + + $cursor = $parent.FullName + } + } + + throw "Could not locate repository root. Set JOURNAL_REPO_ROOT to the repo path." +} + +function Initialize-JournalDotnetEnv { + param( + [Parameter(Mandatory = $true)] + [string]$RepoRoot + ) + + $dotnetCliHome = Join-Path $RepoRoot ".dotnet_home" + $nugetPackages = Join-Path $RepoRoot ".nuget\packages" + $nugetHttpCachePath = Join-Path $RepoRoot ".nuget\http-cache" + + $env:DOTNET_CLI_HOME = $dotnetCliHome + $env:NUGET_PACKAGES = $nugetPackages + $env:NUGET_HTTP_CACHE_PATH = $nugetHttpCachePath + $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "1" + $env:DOTNET_ADD_GLOBAL_TOOLS_TO_PATH = "0" + $env:DOTNET_GENERATE_ASPNET_CERTIFICATE = "0" + $env:DOTNET_CLI_TELEMETRY_OPTOUT = "1" + $env:NUGET_CERT_REVOCATION_MODE = "offline" + + New-Item -ItemType Directory -Force -Path $dotnetCliHome, $nugetPackages, $nugetHttpCachePath | Out-Null +} + +function Initialize-JournalPipEnv { + param( + [Parameter(Mandatory = $true)] + [string]$RepoRoot + ) + + $pipCacheDir = Join-Path $RepoRoot ".pip\cache" + $pipTempDir = Join-Path $RepoRoot ".tmp\pip-temp" + + $env:PIP_CACHE_DIR = $pipCacheDir + $env:TEMP = $pipTempDir + $env:TMP = $pipTempDir + $env:PIP_DISABLE_PIP_VERSION_CHECK = "1" + $env:PIP_DEFAULT_TIMEOUT = "30" + $env:PIP_RETRIES = "2" + + New-Item -ItemType Directory -Force -Path $pipCacheDir, $pipTempDir | Out-Null +} + +function Initialize-JournalHuggingFaceEnv { + param( + [Parameter(Mandatory = $true)] + [string]$RepoRoot + ) + + $hfHome = Join-Path $RepoRoot ".cache\huggingface" + $hfHubCache = Join-Path $hfHome "hub" + + $env:HF_HOME = $hfHome + $env:HUGGINGFACE_HUB_CACHE = $hfHubCache + $env:HF_HUB_DISABLE_SYMLINKS_WARNING = "1" + + New-Item -ItemType Directory -Force -Path $hfHubCache | Out-Null +} + +function Resolve-JournalSidecarProjectPath { + param( + [Parameter(Mandatory = $true)] + [string]$RepoRoot + ) + + $defaultPath = Join-Path $RepoRoot "Journal.Sidecar\Journal.Sidecar.csproj" + if (Test-Path $defaultPath) { + return (Resolve-Path $defaultPath).Path + } + + $exactMatches = @(Get-ChildItem -Path $RepoRoot -Recurse -File -Filter "Journal.Sidecar.csproj" -ErrorAction SilentlyContinue) + if ($exactMatches.Count -eq 1) { + return $exactMatches[0].FullName + } + if ($exactMatches.Count -gt 1) { + $matchList = ($exactMatches | ForEach-Object { $_.FullName }) -join "; " + throw "Found multiple Journal.Sidecar.csproj files: $matchList" + } + + $fallbackMatches = @(Get-ChildItem -Path $RepoRoot -Recurse -File -Filter "*.csproj" -ErrorAction SilentlyContinue | Where-Object { + $_.BaseName -match "(?i)sidecar" -or $_.DirectoryName -match "(?i)sidecar" + }) + if ($fallbackMatches.Count -eq 1) { + return $fallbackMatches[0].FullName + } + if ($fallbackMatches.Count -gt 1) { + $matchList = ($fallbackMatches | ForEach-Object { $_.FullName }) -join "; " + throw "Found multiple sidecar-like csproj files: $matchList" + } + + throw "Could not locate a sidecar project file under: $RepoRoot" +} + +function Resolve-JournalAppRoot { + param( + [Parameter(Mandatory = $true)] + [string]$RepoRoot + ) + + $defaultPath = Join-Path $RepoRoot "Journal.App" + $defaultPackageJson = Join-Path $defaultPath "package.json" + $defaultTauriConfig = Join-Path $defaultPath "src-tauri\tauri.conf.json" + if ((Test-Path $defaultPackageJson) -and (Test-Path $defaultTauriConfig)) { + return (Resolve-Path $defaultPath).Path + } + + $packageJsonMatches = @(Get-ChildItem -Path $RepoRoot -Recurse -File -Filter "package.json" -ErrorAction SilentlyContinue | Where-Object { + Test-Path (Join-Path $_.DirectoryName "src-tauri\tauri.conf.json") + }) + if ($packageJsonMatches.Count -eq 1) { + return $packageJsonMatches[0].DirectoryName + } + if ($packageJsonMatches.Count -gt 1) { + $matchList = ($packageJsonMatches | ForEach-Object { $_.DirectoryName }) -join "; " + throw "Found multiple Tauri app roots under repo: $matchList" + } + + throw "Could not locate Journal.App root under: $RepoRoot" +} + +function Resolve-JournalWebGatewayProjectPath { + param( + [Parameter(Mandatory = $true)] + [string]$RepoRoot + ) + + $defaultPath = Join-Path $RepoRoot "Journal.WebGateway\Journal.WebGateway.csproj" + if (Test-Path $defaultPath) { + return (Resolve-Path $defaultPath).Path + } + + $exactMatches = @(Get-ChildItem -Path $RepoRoot -Recurse -File -Filter "Journal.WebGateway.csproj" -ErrorAction SilentlyContinue) + if ($exactMatches.Count -eq 1) { + return $exactMatches[0].FullName + } + if ($exactMatches.Count -gt 1) { + $matchList = ($exactMatches | ForEach-Object { $_.FullName }) -join "; " + throw "Found multiple Journal.WebGateway.csproj files: $matchList" + } + + throw "Could not locate Journal.WebGateway.csproj under: $RepoRoot" +} diff --git a/sdt-workspace.json b/sdt-workspace.json new file mode 100644 index 0000000..0df7071 --- /dev/null +++ b/sdt-workspace.json @@ -0,0 +1,10 @@ +{ + "name": "Stan's Dev Projects", + "projects": [ + { + "name": "Project Journal", + "description": "Encrypted journal — Tauri desktop + C#/.NET backend + SvelteKit UI", + "path": "journal" + } + ] +} \ No newline at end of file