diff --git a/.github/workflows/github-actions-builder.yml b/.github/workflows/github-actions-builder.yml index 5c79692c..d026a3c6 100644 --- a/.github/workflows/github-actions-builder.yml +++ b/.github/workflows/github-actions-builder.yml @@ -46,7 +46,12 @@ jobs: if: matrix.settings.platform == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly + with: + # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. + targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - name: Get pnpm store directory id: pnpm-cache shell: bash @@ -70,6 +75,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} with: tagName: 'v__VERSION__' # the action automatically replaces \_\_VERSION\_\_ with the app version. releaseName: 'v__VERSION__' diff --git a/android/app/build.gradle b/android/app/build.gradle index d48fc088..c43f04f4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -8,7 +8,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 2 - versionName "124.2.2" + versionName "127.0.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/android/app/release/output-metadata.json b/android/app/release/output-metadata.json index ef625ab2..ae7fd1bb 100644 --- a/android/app/release/output-metadata.json +++ b/android/app/release/output-metadata.json @@ -12,7 +12,7 @@ "filters": [], "attributes": [], "versionCode": 2, - "versionName": "124.2.2", + "versionName": "128.0.1", "outputFile": "app-release.apk" } ], diff --git a/index.html b/index.html index 0459e154..972d7f37 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ + diff --git a/manifest.json b/manifest.json new file mode 100644 index 00000000..be6e8ca5 --- /dev/null +++ b/manifest.json @@ -0,0 +1,63 @@ +{ + "name": "RisuAI", + "icons": [ + { + "src": "logo_512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "logo_192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo_16.png", + "type": "image/png", + "sizes": "16x16" + }, + { + "src": "logo_32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "logo_256.png", + "type": "image/png", + "sizes": "256x256" + } + ], + "start_url": "/", + "display": "standalone", + "theme_color": "#4682B4", + "share_target": { + "action": "/receive-files/", + "method": "POST", + "enctype": "multipart/form-data", + "params": { + "files": [ + { + "name": "character", + "accept": [".charx"] + }, + { + "name": "preset", + "accept": [".risup"] + }, + { + "name": "module", + "accept": [".risum"] + } + ] + } + }, + "file_handlers": [ + { + "action": "/", + "accept": { + "application/octet-stream": [".charx", ".risup", ".risum"] + } + } + ] + +} \ No newline at end of file diff --git a/package.json b/package.json index 2d9fe475..b5e68247 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "private": true, "version": "1.0.0", "type": "module", + "packageManager": "pnpm@9.10.0", "scripts": { "dev": "vite", "build": "vite build", @@ -27,7 +28,15 @@ "@risuai/ccardlib": "^0.4.1", "@smithy/protocol-http": "^3.0.12", "@smithy/signature-v4": "^2.0.19", - "@tauri-apps/api": "1.5.3", + "@tauri-apps/api": "2.0.0", + "@tauri-apps/plugin-deep-link": "~2", + "@tauri-apps/plugin-dialog": "~2", + "@tauri-apps/plugin-fs": "~2", + "@tauri-apps/plugin-http": "~2", + "@tauri-apps/plugin-os": "~2", + "@tauri-apps/plugin-process": "~2", + "@tauri-apps/plugin-shell": "~2", + "@tauri-apps/plugin-updater": "~2", "@types/markdown-it": "^14.1.1", "@xenova/transformers": "^2.17.1", "blueimp-md5": "^2.19.0", @@ -81,7 +90,7 @@ "@sveltejs/vite-plugin-svelte": "3.0.1", "@swc/core": "1.5.7", "@tailwindcss/typography": "^0.5.10", - "@tauri-apps/cli": "1.5.11", + "@tauri-apps/cli": "2.0.2", "@tsconfig/svelte": "^3.0.0", "@types/blueimp-md5": "^2.18.2", "@types/codemirror": "^5.60.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea57d603..064ca1a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,8 +42,32 @@ importers: specifier: ^2.0.19 version: 2.0.19 '@tauri-apps/api': - specifier: 1.5.3 - version: 1.5.3 + specifier: 2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-deep-link': + specifier: ~2 + version: 2.0.0 + '@tauri-apps/plugin-dialog': + specifier: ~2 + version: 2.0.0 + '@tauri-apps/plugin-fs': + specifier: ~2 + version: 2.0.0 + '@tauri-apps/plugin-http': + specifier: ~2 + version: 2.0.0 + '@tauri-apps/plugin-os': + specifier: ~2 + version: 2.0.0 + '@tauri-apps/plugin-process': + specifier: ~2 + version: 2.0.0 + '@tauri-apps/plugin-shell': + specifier: ~2 + version: 2.0.0 + '@tauri-apps/plugin-updater': + specifier: ~2 + version: 2.0.0 '@types/markdown-it': specifier: ^14.1.1 version: 14.1.1 @@ -199,8 +223,8 @@ importers: specifier: ^0.5.10 version: 0.5.10(tailwindcss@3.4.1(ts-node@10.9.2(@swc/core@1.5.7)(@types/node@18.19.7)(typescript@5.3.3))) '@tauri-apps/cli': - specifier: 1.5.11 - version: 1.5.11 + specifier: 2.0.2 + version: 2.0.2 '@tsconfig/svelte': specifier: ^3.0.0 version: 3.0.0 @@ -914,75 +938,98 @@ packages: peerDependencies: tailwindcss: '>=3.0.0 || insiders' - '@tauri-apps/api@1.5.3': - resolution: {integrity: sha512-zxnDjHHKjOsrIzZm6nO5Xapb/BxqUq1tc7cGkFXsFkGTsSWgCPH1D8mm0XS9weJY2OaR73I3k3S+b7eSzJDfqA==} - engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} + '@tauri-apps/api@2.0.0': + resolution: {integrity: sha512-moKgCp2EX7X5GiOx/G/bmoEpkFQVVmyS98UaJU4xUVzan+E1BdwlAKcbip+cGldshYOqL4JSwAEN1OkRXeug0Q==} - '@tauri-apps/cli-darwin-arm64@1.5.11': - resolution: {integrity: sha512-2NLSglDb5VfvTbMtmOKWyD+oaL/e8Z/ZZGovHtUFyUSFRabdXc6cZOlcD1BhFvYkHqm+TqGaz5qtPR5UbqDs8A==} + '@tauri-apps/cli-darwin-arm64@2.0.2': + resolution: {integrity: sha512-B+/a8Q6wAqmB4A4HVeK0oQP5TdQGKW60ZLOI9O2ktH2HPr9ETr3XkwXPuJ2uAOuGEgtRZHBgFOIgG000vMnKlg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@tauri-apps/cli-darwin-x64@1.5.11': - resolution: {integrity: sha512-/RQllHiJRH2fJOCudtZlaUIjofkHzP3zZgxi71ZUm7Fy80smU5TDfwpwOvB0wSVh0g/ciDjMArCSTo0MRvL+ag==} + '@tauri-apps/cli-darwin-x64@2.0.2': + resolution: {integrity: sha512-kaurhn6XT4gAVCPAQSSHl/CHFxTS0ljc47N7iGTSlYJ03sCWPRZeNuVa/bn6rolz9MA2JfnRnFqB1pUL6jzp9Q==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@tauri-apps/cli-linux-arm-gnueabihf@1.5.11': - resolution: {integrity: sha512-IlBuBPKmMm+a5LLUEK6a21UGr9ZYd6zKuKLq6IGM4tVweQa8Sf2kP2Nqs74dMGIUrLmMs0vuqdURpykQg+z4NQ==} + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.2': + resolution: {integrity: sha512-bVrofjlacMxmGMcqK18iBW05tsZXOd19/MnqruFFcHSVjvkGGIXHMtUbMXnZNXBPkHDsnfytNtkY9SZGfCFaBA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@tauri-apps/cli-linux-arm64-gnu@1.5.11': - resolution: {integrity: sha512-w+k1bNHCU/GbmXshtAhyTwqosThUDmCEFLU4Zkin1vl2fuAtQry2RN7thfcJFepblUGL/J7yh3Q/0+BCjtspKQ==} + '@tauri-apps/cli-linux-arm64-gnu@2.0.2': + resolution: {integrity: sha512-7XCBn0TTBVQGnV42dXcbHPLg/9W8kJoVzuliIozvNGyRWxfXqDbQYzpI48HUQG3LgHMabcw8+pVZAfGhevLrCA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tauri-apps/cli-linux-arm64-musl@1.5.11': - resolution: {integrity: sha512-PN6/dl+OfYQ/qrAy4HRAfksJ2AyWQYn2IA/2Wwpaa7SDRz2+hzwTQkvajuvy0sQ5L2WCG7ymFYRYMbpC6Hk9Pg==} + '@tauri-apps/cli-linux-arm64-musl@2.0.2': + resolution: {integrity: sha512-1xi2SreGVlpAL68MCsDUY63rdItUdPZreXIAcOVqvUehcJRYOa1XGSBhrV0YXRgZeh0AtKC19z6PRzcv4rosZA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tauri-apps/cli-linux-x64-gnu@1.5.11': - resolution: {integrity: sha512-MTVXLi89Nj7Apcvjezw92m7ZqIDKT5SFKZtVPCg6RoLUBTzko/BQoXYIRWmdoz2pgkHDUHgO2OMJ8oKzzddXbw==} + '@tauri-apps/cli-linux-x64-gnu@2.0.2': + resolution: {integrity: sha512-WVjwYzPWFqZVg1fx6KSU5w47Q0VbMyaCp34qs5EcS8EIU0/RnofdzqUoOYqvgGVgNgoz7Pj5dXK2SkS8BHXMmA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tauri-apps/cli-linux-x64-musl@1.5.11': - resolution: {integrity: sha512-kwzAjqFpz7rvTs7WGZLy/a5nS5t15QKr3E9FG95MNF0exTl3d29YoAUAe1Mn0mOSrTJ9Z+vYYAcI/QdcsGBP+w==} + '@tauri-apps/cli-linux-x64-musl@2.0.2': + resolution: {integrity: sha512-h5miE2mctgaQNn/BbG9o1pnJcrx+VGBi2A6JFqGu934lFgSV5+s28M8Gc8AF2JgFH4hQV4IuMkeSw8Chu5Dodg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tauri-apps/cli-win32-arm64-msvc@1.5.11': - resolution: {integrity: sha512-L+5NZ/rHrSUrMxjj6YpFYCXp6wHnq8c8SfDTBOX8dO8x+5283/vftb4vvuGIsLS4UwUFXFnLt3XQr44n84E67Q==} + '@tauri-apps/cli-win32-arm64-msvc@2.0.2': + resolution: {integrity: sha512-2b8oO0+dYonahG5PfA/zoq0zlafLclfmXgqoWDZ++UiPtQHJNpNeEQ8GWbSFKGHQ494Jo6jHvazOojGRE1kqAg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@tauri-apps/cli-win32-ia32-msvc@1.5.11': - resolution: {integrity: sha512-oVlD9IVewrY0lZzTdb71kNXkjdgMqFq+ohb67YsJb4Rf7o8A9DTlFds1XLCe3joqLMm4M+gvBKD7YnGIdxQ9vA==} + '@tauri-apps/cli-win32-ia32-msvc@2.0.2': + resolution: {integrity: sha512-axgICLunFi0To3EibdCBgbST5RocsSmtM4c04+CbcX8WQQosJ9ziWlCSrrOTRr+gJERAMSvEyVUS98f6bWMw9A==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@tauri-apps/cli-win32-x64-msvc@1.5.11': - resolution: {integrity: sha512-1CexcqUFCis5ypUIMOKllxUBrna09McbftWENgvVXMfA+SP+yPDPAVb8fIvUcdTIwR/yHJwcIucmTB4anww4vg==} + '@tauri-apps/cli-win32-x64-msvc@2.0.2': + resolution: {integrity: sha512-JR17cM6+DyExZRgpXr2/DdqvcFYi/EKvQt8dI5R1/uQoesWd8jeNnrU7c1FG1Zmw9+pTzDztsNqEKsrNq2sNIg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@tauri-apps/cli@1.5.11': - resolution: {integrity: sha512-B475D7phZrq5sZ3kDABH4g2mEoUIHtnIO+r4ZGAAfsjMbZCwXxR/jlMGTEL+VO3YzjpF7gQe38IzB4vLBbVppw==} + '@tauri-apps/cli@2.0.2': + resolution: {integrity: sha512-R4ontHZvXORArERAHIidp5zRfZEshZczTiK+poslBv7AGKpQZoMw+E49zns7mOmP64i2Cq9Ci0pJvi4Rm8Okzw==} engines: {node: '>= 10'} hasBin: true + '@tauri-apps/plugin-deep-link@2.0.0': + resolution: {integrity: sha512-cDa2k1OrRU5DoKc0IXl1Y8RlFOU107u2phdZfT7FkApsC6TL/VAPs3YOUTT8p9/PZ50EjOKP104HFMqVqnQ0bw==} + + '@tauri-apps/plugin-dialog@2.0.0': + resolution: {integrity: sha512-ApNkejXP2jpPBSifznPPcHTXxu9/YaRW+eJ+8+nYwqp0lLUtebFHG4QhxitM43wwReHE81WAV1DQ/b+2VBftOA==} + + '@tauri-apps/plugin-fs@2.0.0': + resolution: {integrity: sha512-BNEeQQ5aH8J5SwYuWgRszVyItsmquRuzK2QRkVj8Z0sCsLnSvJFYI3JHRzzr3ltZGq1nMPtblrlZzuKqVzRawA==} + + '@tauri-apps/plugin-http@2.0.0': + resolution: {integrity: sha512-UfKAICL25ayluV/SjiEQujz8q/2uyAzp3u9uaHFkaIyKS5usBL8DoqSwi4eKz2mEjkbxTwldhDEXG4CEfTE0JQ==} + + '@tauri-apps/plugin-os@2.0.0': + resolution: {integrity: sha512-M7hG/nNyQYTJxVG/UhTKhp9mpXriwWzrs9mqDreB8mIgqA3ek5nHLdwRZJWhkKjZrnDT4v9CpA9BhYeplTlAiA==} + + '@tauri-apps/plugin-process@2.0.0': + resolution: {integrity: sha512-OYzi0GnkrF4NAnsHZU7U3tjSoP0PbeAlO7T1Z+vJoBUH9sFQ1NSLqWYWQyf8hcb3gVWe7P1JggjiskO+LST1ug==} + + '@tauri-apps/plugin-shell@2.0.0': + resolution: {integrity: sha512-OpW2+ycgJLrEoZityWeWYk+6ZWP9VyiAfbO+N/O8VfLkqyOym8kXh7odKDfINx9RAotkSGBtQM4abyKfJDkcUg==} + + '@tauri-apps/plugin-updater@2.0.0': + resolution: {integrity: sha512-N0cl71g7RPr7zK2Fe5aoIwzw14NcdLcz7XMGFWZVjprsqgDRWoxbnUkknyCQMZthjhGkppCd/wN2MIsUz+eAhQ==} + '@trapezedev/gradle-parse@7.0.10': resolution: {integrity: sha512-k822Is3jGroqOTKF0gAFm80LmhFJWBAyZvNtyuXq6uQUzDDe2fj/gHwixP6VFzlpaWKLP7IuR609Xv8gwJCXyg==} @@ -4383,50 +4430,82 @@ snapshots: postcss-selector-parser: 6.0.10 tailwindcss: 3.4.1(ts-node@10.9.2(@swc/core@1.5.7)(@types/node@18.19.7)(typescript@5.3.3)) - '@tauri-apps/api@1.5.3': {} + '@tauri-apps/api@2.0.0': {} - '@tauri-apps/cli-darwin-arm64@1.5.11': + '@tauri-apps/cli-darwin-arm64@2.0.2': optional: true - '@tauri-apps/cli-darwin-x64@1.5.11': + '@tauri-apps/cli-darwin-x64@2.0.2': optional: true - '@tauri-apps/cli-linux-arm-gnueabihf@1.5.11': + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.2': optional: true - '@tauri-apps/cli-linux-arm64-gnu@1.5.11': + '@tauri-apps/cli-linux-arm64-gnu@2.0.2': optional: true - '@tauri-apps/cli-linux-arm64-musl@1.5.11': + '@tauri-apps/cli-linux-arm64-musl@2.0.2': optional: true - '@tauri-apps/cli-linux-x64-gnu@1.5.11': + '@tauri-apps/cli-linux-x64-gnu@2.0.2': optional: true - '@tauri-apps/cli-linux-x64-musl@1.5.11': + '@tauri-apps/cli-linux-x64-musl@2.0.2': optional: true - '@tauri-apps/cli-win32-arm64-msvc@1.5.11': + '@tauri-apps/cli-win32-arm64-msvc@2.0.2': optional: true - '@tauri-apps/cli-win32-ia32-msvc@1.5.11': + '@tauri-apps/cli-win32-ia32-msvc@2.0.2': optional: true - '@tauri-apps/cli-win32-x64-msvc@1.5.11': + '@tauri-apps/cli-win32-x64-msvc@2.0.2': optional: true - '@tauri-apps/cli@1.5.11': + '@tauri-apps/cli@2.0.2': optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 1.5.11 - '@tauri-apps/cli-darwin-x64': 1.5.11 - '@tauri-apps/cli-linux-arm-gnueabihf': 1.5.11 - '@tauri-apps/cli-linux-arm64-gnu': 1.5.11 - '@tauri-apps/cli-linux-arm64-musl': 1.5.11 - '@tauri-apps/cli-linux-x64-gnu': 1.5.11 - '@tauri-apps/cli-linux-x64-musl': 1.5.11 - '@tauri-apps/cli-win32-arm64-msvc': 1.5.11 - '@tauri-apps/cli-win32-ia32-msvc': 1.5.11 - '@tauri-apps/cli-win32-x64-msvc': 1.5.11 + '@tauri-apps/cli-darwin-arm64': 2.0.2 + '@tauri-apps/cli-darwin-x64': 2.0.2 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.2 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.2 + '@tauri-apps/cli-linux-arm64-musl': 2.0.2 + '@tauri-apps/cli-linux-x64-gnu': 2.0.2 + '@tauri-apps/cli-linux-x64-musl': 2.0.2 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.2 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.2 + '@tauri-apps/cli-win32-x64-msvc': 2.0.2 + + '@tauri-apps/plugin-deep-link@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-dialog@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-fs@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-http@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-os@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-process@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-shell@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-updater@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 '@trapezedev/gradle-parse@7.0.10': {} diff --git a/public/logo_192.png b/public/logo_192.png new file mode 100644 index 00000000..17db294e Binary files /dev/null and b/public/logo_192.png differ diff --git a/public/logo_512.png b/public/logo_512.png new file mode 100644 index 00000000..76306c27 Binary files /dev/null and b/public/logo_512.png differ diff --git a/public/sw.js b/public/sw.js index a94ac67d..ed1172cb 100644 --- a/public/sw.js +++ b/public/sw.js @@ -35,6 +35,36 @@ self.addEventListener('fetch', (event) => { } case "init":{ event.respondWith(new Response("v2")) + break + } + case 'share':{ + event.respondWith((async () => { + const formData = await event.request.formData(); + /** + * @type {File} + */ + const character = formData.get('character') + const preset = formData.get('preset') + const module = formData.get('module') + if(character){ + const buf = await character.arrayBuffer() + await registerCache(`/sw/share/character`, buf, true) + return Response.redirect("/#share_character", 303) + } + if(preset){ + const buf = await preset.arrayBuffer() + await registerCache(`/sw/share/preset`, buf, true) + return Response.redirect("/#share_preset", 303) + } + if(module){ + const buf = await module.arrayBuffer() + await registerCache(`/sw/share/module`, buf, true) + return Response.redirect("/#share_module", 303) + } + return Response.redirect("/", 303) + + })()) + break } default: { event.respondWith(new Response( diff --git a/server/node/server.cjs b/server/node/server.cjs index 00c9de80..abf88d98 100644 --- a/server/node/server.cjs +++ b/server/node/server.cjs @@ -3,12 +3,11 @@ const app = express(); const path = require('path'); const htmlparser = require('node-html-parser'); const { existsSync, mkdirSync, readFileSync, writeFileSync } = require('fs'); -const bodyParser = require('body-parser'); const fs = require('fs/promises') const crypto = require('crypto') app.use(express.static(path.join(process.cwd(), 'dist'), {index: false})); -app.use(bodyParser.raw({ limit: 100000000 })); -app.use(bodyParser.json()) +app.use(express.json({ limit: '50mb' })); +app.use(express.raw({ type: 'application/octet-stream', limit: '50mb' })); const {pipeline} = require('stream/promises') let password = '' @@ -90,6 +89,55 @@ const reverseProxyFunc = async (req, res, next) => { } } +const reverseProxyFunc_get = async (req, res, next) => { + const urlParam = req.headers['risu-url'] ? decodeURIComponent(req.headers['risu-url']) : req.query.url; + + if (!urlParam) { + res.status(400).send({ + error:'URL has no param' + }); + return; + } + const header = req.headers['risu-header'] ? JSON.parse(decodeURIComponent(req.headers['risu-header'])) : req.headers; + if(!header['x-forwarded-for']){ + header['x-forwarded-for'] = req.ip + } + let originalResponse; + try { + // make request to original server + originalResponse = await fetch(urlParam, { + method: 'GET', + headers: header + }); + // get response body as stream + const originalBody = originalResponse.body; + // get response headers + const head = new Headers(originalResponse.headers); + head.delete('content-security-policy'); + head.delete('content-security-policy-report-only'); + head.delete('clear-site-data'); + head.delete('Cache-Control'); + head.delete('Content-Encoding'); + const headObj = {}; + for (let [k, v] of head) { + headObj[k] = v; + } + // send response headers to client + res.header(headObj); + // send response status to client + res.status(originalResponse.status); + // send response body to client + await pipeline(originalResponse.body, res); + } + catch (err) { + next(err); + return; + } +} + +app.get('/proxy', reverseProxyFunc_get); +app.get('/proxy2', reverseProxyFunc_get); + app.post('/proxy', reverseProxyFunc); app.post('/proxy2', reverseProxyFunc); @@ -248,4 +296,4 @@ app.post('/api/write', async (req, res, next) => { app.listen(6001, () => { console.log("Server is listening on http://localhost:6001/"); -}); +}); \ No newline at end of file diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d56a9850..e5e5496d 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2,205 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "actix-codec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" -dependencies = [ - "bitflags 2.6.0", - "bytes", - "futures-core", - "futures-sink", - "memchr", - "pin-project-lite", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "actix-cors" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0346d8c1f762b41b458ed3145eea914966bb9ad20b9be0d6d463b20d45586370" -dependencies = [ - "actix-utils", - "actix-web", - "derive_more", - "futures-util", - "log", - "once_cell", - "smallvec", -] - -[[package]] -name = "actix-http" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "ahash", - "base64 0.22.1", - "bitflags 2.6.0", - "brotli 6.0.0", - "bytes", - "bytestring", - "derive_more", - "encoding_rs", - "flate2", - "futures-core", - "h2", - "http", - "httparse", - "httpdate", - "itoa 1.0.11", - "language-tags", - "local-channel", - "mime", - "percent-encoding", - "pin-project-lite", - "rand 0.8.5", - "sha1", - "smallvec", - "tokio", - "tokio-util", - "tracing", - "zstd 0.13.2", -] - -[[package]] -name = "actix-macros" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" -dependencies = [ - "quote", - "syn 2.0.74", -] - -[[package]] -name = "actix-router" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" -dependencies = [ - "bytestring", - "cfg-if", - "http", - "regex", - "regex-lite", - "serde", - "tracing", -] - -[[package]] -name = "actix-rt" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" -dependencies = [ - "actix-macros", - "futures-core", - "tokio", -] - -[[package]] -name = "actix-server" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" -dependencies = [ - "actix-rt", - "actix-service", - "actix-utils", - "futures-core", - "futures-util", - "mio", - "socket2", - "tokio", - "tracing", -] - -[[package]] -name = "actix-service" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" -dependencies = [ - "futures-core", - "paste", - "pin-project-lite", -] - -[[package]] -name = "actix-utils" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" -dependencies = [ - "local-waker", - "pin-project-lite", -] - -[[package]] -name = "actix-web" -version = "4.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" -dependencies = [ - "actix-codec", - "actix-http", - "actix-macros", - "actix-router", - "actix-rt", - "actix-server", - "actix-service", - "actix-utils", - "actix-web-codegen", - "ahash", - "bytes", - "bytestring", - "cfg-if", - "cookie", - "derive_more", - "encoding_rs", - "futures-core", - "futures-util", - "impl-more", - "itoa 1.0.11", - "language-tags", - "log", - "mime", - "once_cell", - "pin-project-lite", - "regex", - "regex-lite", - "serde", - "serde_json", - "serde_urlencoded", - "smallvec", - "socket2", - "time", - "url", -] - -[[package]] -name = "actix-web-codegen" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" -dependencies = [ - "actix-router", - "proc-macro2", - "quote", - "syn 2.0.74", -] - [[package]] name = "addr2line" version = "0.22.0" @@ -227,19 +28,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom 0.2.15", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -286,29 +74,207 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] -name = "atk" -version = "0.15.1" +name = "arbitrary" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "ashpd" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe7e0dd0ac5a401dc116ed9f9119cf9decc625600474cb41f0fc0a0050abc9a" +dependencies = [ + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "raw-window-handle", + "serde", + "serde_repr", + "tokio", + "url", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "zbus", +] + +[[package]] +name = "async-broadcast" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "2.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", + "tracing", +] + +[[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.74", +] + +[[package]] +name = "async-signal" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.59.0", +] + +[[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.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + +[[package]] +name = "atk" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "bitflags 1.3.2", "glib", "libc", ] [[package]] name = "atk-sys" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.2", + "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.3.0" @@ -330,12 +296,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -380,6 +340,9 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "block" @@ -397,14 +360,25 @@ dependencies = [ ] [[package]] -name = "brotli" -version = "3.5.0" +name = "block2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor 2.5.1", + "objc2", +] + +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", ] [[package]] @@ -415,17 +389,7 @@ checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor 4.0.1", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", + "brotli-decompressor", ] [[package]] @@ -445,7 +409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "regex-automata 0.4.7", + "regex-automata", "serde", ] @@ -476,15 +440,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bytestring" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" -dependencies = [ - "bytes", -] - [[package]] name = "bzip2" version = "0.4.4" @@ -508,36 +463,69 @@ dependencies = [ [[package]] name = "cairo-rs" -version = "0.15.12" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "cairo-sys-rs", "glib", "libc", + "once_cell", "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.15.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "glib-sys", "libc", - "system-deps 6.2.2", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", ] [[package]] name = "cargo_toml" -version = "0.15.3" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "toml 0.7.8", + "toml 0.8.2", ] [[package]] @@ -568,15 +556,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "cfg-expr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7" -dependencies = [ - "smallvec", -] - [[package]] name = "cfg-expr" version = "0.15.8" @@ -593,6 +572,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -618,40 +603,34 @@ dependencies = [ [[package]] name = "cocoa" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "block", "cocoa-foundation", - "core-foundation", + "core-foundation 0.10.0", "core-graphics", - "foreign-types", + "foreign-types 0.5.0", "libc", "objc", ] [[package]] name = "cocoa-foundation" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "block", - "core-foundation", + "core-foundation 0.10.0", "core-graphics-types", "libc", "objc", ] -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "combine" version = "4.6.7" @@ -662,6 +641,35 @@ dependencies = [ "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 = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "tiny-keccak", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -676,15 +684,32 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cookie" -version = "0.16.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" dependencies = [ "percent-encoding", "time", "version_check", ] +[[package]] +name = "cookie_store" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4934e6b7e8419148b6ef56950d277af8561060b56afd59e2aadf98b59fce6baa" +dependencies = [ + "cookie", + "idna 0.5.0", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -695,6 +720,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -703,25 +738,25 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 1.3.2", - "core-foundation", + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] [[package]] name = "core-graphics-types" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 1.3.2", - "core-foundation", + "bitflags 2.6.0", + "core-foundation 0.10.0", "libc", ] @@ -752,31 +787,18 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-common" version = "0.1.6" @@ -859,6 +881,12 @@ dependencies = [ "syn 2.0.74", ] +[[package]] +name = "data-url" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" + [[package]] name = "deranged" version = "0.3.11" @@ -869,6 +897,28 @@ dependencies = [ "serde", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "derive_more" version = "0.99.18" @@ -894,24 +944,24 @@ dependencies = [ ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "dirs" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "cfg-if", - "dirs-sys-next", + "dirs-sys", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "dirs-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -920,6 +970,73 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[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.74", +] + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading", +] + +[[package]] +name = "dlopen2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + +[[package]] +name = "dlv-list" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" +dependencies = [ + "serde", +] + [[package]] name = "dtoa" version = "1.0.9" @@ -941,6 +1058,12 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "embed-resource" version = "2.4.3" @@ -950,7 +1073,7 @@ dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.8.19", + "toml 0.8.2", "vswhom", "winreg 0.52.0", ] @@ -970,12 +1093,49 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + +[[package]] +name = "enumflags2" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.3.9" @@ -986,6 +1146,27 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] + [[package]] name = "eventsource-client" version = "0.12.2" @@ -993,8 +1174,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c80c6714d1a380314fcb11a22eeff022e1e1c9642f0bb54e15dc9cb29f37b29" dependencies = [ "futures", - "hyper", - "hyper-rustls", + "hyper 0.14.30", + "hyper-rustls 0.24.2", "hyper-timeout", "log", "pin-project", @@ -1059,6 +1240,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fluent-uri" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1071,7 +1261,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[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 0.3.1", +] + +[[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.74", ] [[package]] @@ -1080,6 +1291,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[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.1" @@ -1147,6 +1364,19 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -1199,11 +1429,10 @@ dependencies = [ [[package]] name = "gdk" -version = "0.15.4" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" +checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -1215,35 +1444,35 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.15.11" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", "libc", + "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140b2f5378256527150350a8346dbdb08fadc13453a7a2d73aecd5fab3c402a7" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.2", + "system-deps", ] [[package]] name = "gdk-sys" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1253,47 +1482,48 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.2.2", + "system-deps", ] [[package]] name = "gdkwayland-sys" -version = "0.15.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cca49a59ad8cfdf36ef7330fe7bdfbe1d34323220cc16a0de2679ee773aee2c2" +checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" dependencies = [ "gdk-sys", "glib-sys", "gobject-sys", "libc", "pkg-config", - "system-deps 6.2.2", + "system-deps", ] [[package]] -name = "gdkx11-sys" -version = "0.15.1" +name = "gdkx11" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7f8c7a84b407aa9b143877e267e848ff34106578b64d1e0a24bf550716178" +checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" dependencies = [ - "gdk-sys", - "glib-sys", + "gdk", + "gdkx11-sys", + "gio", + "glib", "libc", - "system-deps 6.2.2", "x11", ] [[package]] -name = "generator" -version = "0.7.5" +name = "gdkx11-sys" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" +checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ - "cc", + "gdk-sys", + "glib-sys", "libc", - "log", - "rustversion", - "windows 0.48.0", + "system-deps", + "x11", ] [[package]] @@ -1306,6 +1536,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30" +dependencies = [ + "rustix", + "windows-targets 0.52.6", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -1336,49 +1576,54 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gio" -version = "0.15.12" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ - "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", + "futures-util", "gio-sys", "glib", "libc", "once_cell", + "pin-project-lite", + "smallvec", "thiserror", ] [[package]] name = "gio-sys" -version = "0.15.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32157a475271e2c4a023382e9cab31c4584ee30a97da41d3c4e9fdd605abcf8d" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.2", + "system-deps", "winapi", ] [[package]] name = "glib" -version = "0.15.12" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.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", @@ -1386,27 +1631,26 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.15.13" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ - "anyhow", "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 2.0.2", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", ] [[package]] name = "glib-sys" -version = "0.15.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", - "system-deps 6.2.2", + "system-deps", ] [[package]] @@ -1415,38 +1659,24 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", -] - [[package]] name = "gobject-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", - "system-deps 6.2.2", + "system-deps", ] [[package]] name = "gtk" -version = "0.15.5" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", - "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -1457,16 +1687,15 @@ dependencies = [ "gtk-sys", "gtk3-macros", "libc", - "once_cell", "pango", "pkg-config", ] [[package]] name = "gtk-sys" -version = "0.15.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -1477,21 +1706,20 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.2.2", + "system-deps", ] [[package]] name = "gtk3-macros" -version = "0.15.6" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ - "anyhow", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", ] [[package]] @@ -1505,7 +1733,26 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", + "indexmap 2.4.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", "indexmap 2.4.0", "slab", "tokio", @@ -1525,15 +1772,6 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.1" @@ -1552,6 +1790,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1592,6 +1836,17 @@ dependencies = [ "itoa 1.0.11", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa 1.0.11", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1599,7 +1854,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -1631,9 +1909,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa 1.0.11", @@ -1645,6 +1923,26 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa 1.0.11", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -1652,13 +1950,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.30", "log", - "rustls", + "rustls 0.21.12", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "rustls 0.23.14", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tower-service", + "webpki-roots", ] [[package]] @@ -1667,7 +1983,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.30", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -1680,12 +1996,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -1697,7 +2032,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -1725,6 +2060,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.5.0" @@ -1735,40 +2080,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "ignore" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.7", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "image" -version = "0.24.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-traits", -] - -[[package]] -name = "impl-more" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" - [[package]] name = "indexmap" version = "1.9.3" @@ -1793,9 +2104,9 @@ dependencies = [ [[package]] name = "infer" -version = "0.13.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551f8c3a39f68f986517db0d1759de85881894fdc7db798bd2a9df9cb04b7fc" +checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847" dependencies = [ "cfb", ] @@ -1824,6 +2135,25 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[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 = "0.4.8" @@ -1838,9 +2168,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "javascriptcore-rs" -version = "0.16.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" dependencies = [ "bitflags 1.3.2", "glib", @@ -1849,28 +2179,30 @@ dependencies = [ [[package]] name = "javascriptcore-rs-sys" -version = "0.4.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905fbb87419c5cde6e3269537e4ea7d46431f3008c5d057e915ef3f115e7793c" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 5.0.0", + "system-deps", ] [[package]] name = "jni" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", + "cfg-if", "combine", "jni-sys", "log", "thiserror", "walkdir", + "windows-sys 0.45.0", ] [[package]] @@ -1899,15 +2231,38 @@ dependencies = [ [[package]] name = "json-patch" -version = "1.4.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" +checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc" dependencies = [ + "jsonptr", "serde", "serde_json", "thiserror", ] +[[package]] +name = "jsonptr" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627" +dependencies = [ + "fluent-uri", + "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.6.0", + "serde", + "unicode-segmentation", +] + [[package]] name = "kuchikiki" version = "0.8.2" @@ -1921,24 +2276,52 @@ dependencies = [ "selectors", ] -[[package]] -name = "language-tags" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" - [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[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.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +[[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.3" @@ -1956,23 +2339,6 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -[[package]] -name = "local-channel" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" -dependencies = [ - "futures-core", - "futures-sink", - "local-waker", -] - -[[package]] -name = "local-waker" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" - [[package]] name = "lock_api" version = "0.4.12" @@ -1989,21 +2355,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - [[package]] name = "mac" version = "0.1.1" @@ -2033,15 +2384,6 @@ dependencies = [ "tendril", ] -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - [[package]] name = "matches" version = "0.1.10" @@ -2071,9 +2413,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minisign-verify" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" +checksum = "a05b5d0594e0cb1ad8cee3373018d2b84e25905dc75b2468114cc9a8e86cfc20" [[package]] name = "miniz_oxide" @@ -2091,13 +2433,32 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] +[[package]] +name = "muda" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8123dfd4996055ac9b15a60ad263b44b01e539007523ad7a4a533a3d93b0591" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror", + "windows-sys 0.59.0", +] + [[package]] name = "native-tls" version = "0.2.12" @@ -2117,14 +2478,16 @@ dependencies = [ [[package]] name = "ndk" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "jni-sys", + "log", "ndk-sys", "num_enum", + "raw-window-handle", "thiserror", ] @@ -2136,9 +2499,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.3.0" +version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ "jni-sys", ] @@ -2149,22 +2512,24 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "libc", + "memoffset", +] + [[package]] name = "nodrop" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -2182,23 +2547,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", ] [[package]] @@ -2212,14 +2577,103 @@ dependencies = [ ] [[package]] -name = "objc-foundation" -version = "0.1.1" +name = "objc-sys" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ - "block", - "objc", - "objc_id", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", ] [[package]] @@ -2257,12 +2711,13 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "open" -version = "3.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ + "is-wsl", + "libc", "pathdiff", - "windows-sys 0.42.0", ] [[package]] @@ -2273,7 +2728,7 @@ checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "once_cell", "openssl-macros", @@ -2309,6 +2764,32 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-multimap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" +dependencies = [ + "dlv-list", + "hashbrown 0.14.5", +] + +[[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 = "os_info" version = "3.8.2" @@ -2321,18 +2802,22 @@ dependencies = [ ] [[package]] -name = "overload" -version = "0.1.1" +name = "os_pipe" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] [[package]] name = "pango" -version = "0.15.10" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ - "bitflags 1.3.2", + "gio", "glib", "libc", "once_cell", @@ -2341,16 +2826,22 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a00081cde4661982ed91d80ef437c20eacaf6aa1a5962c0279ae194662c3aa" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.2", + "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.3" @@ -2385,12 +2876,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pathdiff" version = "0.2.1" @@ -2581,6 +3066,17 @@ 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.30" @@ -2595,7 +3091,7 @@ checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ "base64 0.22.1", "indexmap 2.4.0", - "quick-xml", + "quick-xml 0.32.0", "serde", "time", ] @@ -2613,6 +3109,21 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "polling" +version = "3.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.4.0", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2644,6 +3155,16 @@ dependencies = [ "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", + "toml_edit 0.20.2", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2683,6 +3204,22 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "publicsuffix" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +dependencies = [ + "idna 0.3.0", + "psl-types", +] + [[package]] name = "quick-xml" version = "0.32.0" @@ -2692,6 +3229,63 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.0.0", + "rustls 0.23.14", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring", + "rustc-hash 2.0.0", + "rustls 0.23.14", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -2784,9 +3378,9 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "redox_syscall" @@ -2816,17 +3410,8 @@ checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -2837,21 +3422,9 @@ checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax", ] -[[package]] -name = "regex-lite" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.4" @@ -2869,10 +3442,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-tls", "ipnet", "js-sys", @@ -2882,14 +3455,60 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +dependencies = [ + "base64 0.22.1", + "bytes", + "cookie", + "cookie_store", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls 0.27.3", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.14", + "rustls-pemfile 2.2.0", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "system-configuration 0.6.1", + "tokio", + "tokio-rustls 0.26.0", "tokio-util", "tower-service", "url", @@ -2897,31 +3516,31 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.50.0", + "webpki-roots", + "windows-registry 0.2.0", ] [[package]] name = "rfd" -version = "0.10.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0149778bd99b6959285b0933288206090c50e2327f47a9c463bfdbf45c8823ea" +checksum = "8af382a047821a08aa6bfc09ab0d80ff48d45d8726f7cd8e44891f7cb4a4278e" dependencies = [ - "block", - "dispatch", + "ashpd", + "block2", "glib-sys", "gobject-sys", "gtk-sys", "js-sys", - "lazy_static", "log", - "objc", - "objc-foundation", - "objc_id", + "objc2", + "objc2-app-kit", + "objc2-foundation", "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.37.0", + "windows-sys 0.48.0", ] [[package]] @@ -2943,22 +3562,39 @@ dependencies = [ name = "risuai" version = "0.0.0" dependencies = [ - "actix-cors", - "actix-rt", - "actix-web", "base64 0.21.7", "darling", "eventsource-client", "futures", - "reqwest", + "reqwest 0.11.27", "serde_json", "tar", "tauri", "tauri-build", + "tauri-plugin-deep-link", + "tauri-plugin-dialog", + "tauri-plugin-fs", + "tauri-plugin-http", + "tauri-plugin-os", + "tauri-plugin-process", + "tauri-plugin-shell", + "tauri-plugin-single-instance", + "tauri-plugin-updater", "tiktoken-rs", "url", "uuid", - "zip", + "zip 0.6.6", +] + +[[package]] +name = "rust-ini" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" +dependencies = [ + "cfg-if", + "ordered-multimap", + "trim-in-place", ] [[package]] @@ -2973,6 +3609,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.0" @@ -3003,10 +3645,24 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -3014,7 +3670,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "schannel", "security-framework", ] @@ -3028,6 +3684,21 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -3039,10 +3710,15 @@ dependencies = [ ] [[package]] -name = "rustversion" -version = "1.0.17" +name = "rustls-webpki" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] [[package]] name = "ryu" @@ -3068,6 +3744,33 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.74", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -3097,7 +3800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", "core-foundation-sys", "libc", "security-framework-sys", @@ -3151,6 +3854,17 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-untagged" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6" +dependencies = [ + "erased-serde", + "serde", + "typeid", +] + [[package]] name = "serde_derive" version = "1.0.207" @@ -3162,13 +3876,23 @@ dependencies = [ "syn 2.0.74", ] +[[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.74", +] + [[package]] name = "serde_json" version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" dependencies = [ - "indexmap 2.4.0", "itoa 1.0.11", "memchr", "ryu", @@ -3292,12 +4016,13 @@ dependencies = [ ] [[package]] -name = "sharded-slab" -version = "0.1.7" +name = "shared_child" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +checksum = "09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c" dependencies = [ - "lazy_static", + "libc", + "windows-sys 0.59.0", ] [[package]] @@ -3353,31 +4078,51 @@ dependencies = [ ] [[package]] -name = "soup2" -version = "0.2.1" +name = "softbuffer" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" +checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08" dependencies = [ - "bitflags 1.3.2", - "gio", - "glib", - "libc", - "once_cell", - "soup2-sys", + "bytemuck", + "cfg_aliases", + "core-graphics", + "foreign-types 0.5.0", + "js-sys", + "log", + "objc2", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "wasm-bindgen", + "web-sys", + "windows-sys 0.59.0", ] [[package]] -name = "soup2-sys" -version = "0.2.0" +name = "soup3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" +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 = [ - "bitflags 1.3.2", "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps 5.0.0", + "system-deps", ] [[package]] @@ -3393,13 +4138,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "state" -version = "0.5.3" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" -dependencies = [ - "loom", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" @@ -3439,6 +4181,17 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[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" @@ -3468,16 +4221,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "sys-locale" -version = "0.2.4" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + +[[package]] +name = "sys-locale" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" dependencies = [ - "js-sys", "libc", - "wasm-bindgen", - "web-sys", - "windows-sys 0.45.0", ] [[package]] @@ -3487,8 +4245,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", + "core-foundation 0.9.4", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.9.4", + "system-configuration-sys 0.6.0", ] [[package]] @@ -3502,16 +4271,13 @@ dependencies = [ ] [[package]] -name = "system-deps" -version = "5.0.0" +name = "system-configuration-sys" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18db855554db7bd0e73e06cf7ba3df39f97812cb11d3f75e71c39bf45171797e" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ - "cfg-expr 0.9.1", - "heck 0.3.3", - "pkg-config", - "toml 0.5.11", - "version-compare 0.0.11", + "core-foundation-sys", + "libc", ] [[package]] @@ -3520,37 +4286,30 @@ version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ - "cfg-expr 0.15.8", + "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.8.19", - "version-compare 0.2.0", + "toml 0.8.2", + "version-compare", ] [[package]] name = "tao" -version = "0.16.9" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575c856fc21e551074869dcfaad8f706412bd5b803dfa0fbf6881c4ff4bfafab" +checksum = "a0dbbebe82d02044dfa481adca1550d6dd7bd16e086bc34fa0fbecceb5a63751" dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "cc", + "bitflags 2.6.0", "cocoa", - "core-foundation", + "core-foundation 0.10.0", "core-graphics", "crossbeam-channel", "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", + "dlopen2", + "dpi", "gdkwayland-sys", "gdkx11-sys", - "gio", - "glib", - "glib-sys", "gtk", - "image", "instant", "jni", "lazy_static", @@ -3562,15 +4321,14 @@ dependencies = [ "objc", "once_cell", "parking_lot", - "png", "raw-window-handle", "scopeguard", - "serde", "tao-macros", "unicode-segmentation", - "uuid", - "windows 0.39.0", - "windows-implement", + "url", + "windows", + "windows-core 0.58.0", + "windows-version", "x11-dl", ] @@ -3604,174 +4362,367 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "1.7.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336bc661a3f3250853fa83c6e5245449ed1c26dce5dcb28bdee7efedf6278806" +checksum = "5920aad0804ea5e86808d4b6e8753d3bcbae7efc8f4e41a4da00b45427559868" dependencies = [ "anyhow", - "base64 0.21.7", "bytes", - "cocoa", - "dirs-next", + "dirs", "dunce", "embed_plist", - "encoding_rs", - "flate2", "futures-util", "getrandom 0.2.15", - "glib", "glob", "gtk", "heck 0.5.0", - "http", - "ignore", - "indexmap 1.9.3", - "minisign-verify", - "objc", - "once_cell", - "open", - "os_info", + "http 1.1.0", + "http-range", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", "percent-encoding", - "rand 0.8.5", + "plist", "raw-window-handle", - "regex", - "reqwest", - "rfd", - "semver", + "reqwest 0.12.8", "serde", "serde_json", "serde_repr", "serialize-to-javascript", - "state", - "sys-locale", - "tar", + "swift-rs", + "tauri-build", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "tempfile", "thiserror", - "time", "tokio", + "tray-icon", "url", - "uuid", + "urlpattern", "webkit2gtk", "webview2-com", - "windows 0.39.0", - "zip", + "window-vibrancy", + "windows", ] [[package]] name = "tauri-build" -version = "1.5.3" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c6ec7a5c3296330c7818478948b422967ce4649094696c985f61d50076d29c" +checksum = "935f9b3c49b22b3e2e485a57f46d61cd1ae07b1cbb2ba87387a387caf2d8c4e7" dependencies = [ "anyhow", "cargo_toml", - "dirs-next", + "dirs", + "glob", "heck 0.5.0", "json-patch", + "schemars", "semver", "serde", "serde_json", "tauri-utils", "tauri-winres", + "toml 0.8.2", "walkdir", ] [[package]] name = "tauri-codegen" -version = "1.4.4" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1aed706708ff1200ec12de9cfbf2582b5d8ec05f6a7293911091effbd22036b" +checksum = "95d7443dd4f0b597704b6a14b964ee2ed16e99928d8e6292ae9825f09fbcd30e" dependencies = [ - "base64 0.21.7", - "brotli 3.5.0", + "base64 0.22.1", + "brotli", "ico", "json-patch", "plist", "png", "proc-macro2", "quote", - "regex", "semver", "serde", "serde_json", "sha2", + "syn 2.0.74", "tauri-utils", "thiserror", "time", + "url", "uuid", "walkdir", ] [[package]] name = "tauri-macros" -version = "1.4.5" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88f831d2973ae4f81a706a0004e67dac87f2e4439973bbe98efbd73825d8ede" +checksum = "4d2c0963ccfc3f5194415f2cce7acc975942a8797fbabfb0aa1ed6f59326ae7f" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", "tauri-codegen", "tauri-utils", ] [[package]] -name = "tauri-runtime" -version = "0.14.4" +name = "tauri-plugin" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3068ed62b63dedc705558f4248c7ecbd5561f0f8050949859ea0db2326f26012" +checksum = "b2e6660a409963e4d57b9bfab4addd141eeff41bd3a7fb14e13004a832cf7ef6" dependencies = [ + "anyhow", + "glob", + "plist", + "schemars", + "serde", + "serde_json", + "tauri-utils", + "toml 0.8.2", + "walkdir", +] + +[[package]] +name = "tauri-plugin-deep-link" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31a9b5725027c6e9e075b06cb2d5c2cd3b5c29daa8012b404e1ff755cc56082f" +dependencies = [ + "dunce", + "log", + "rust-ini", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-utils", + "thiserror", + "url", + "windows-registry 0.3.0", + "windows-result", +] + +[[package]] +name = "tauri-plugin-dialog" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddb2fe88b602461c118722c574e2775ab26a4e68886680583874b2f6520608b7" +dependencies = [ + "log", + "raw-window-handle", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror", + "url", +] + +[[package]] +name = "tauri-plugin-fs" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab300488ebec3487ca5f56289692e7e45feb07eea8d5e1dba497f7dc9dd9c407" +dependencies = [ + "anyhow", + "dunce", + "glob", + "percent-encoding", + "schemars", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "thiserror", + "url", + "uuid", +] + +[[package]] +name = "tauri-plugin-http" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784333f1632d96c94346e8145bfe52970923a38a0e6eacd3dccaa12289275acf" +dependencies = [ + "data-url", + "http 1.1.0", + "regex", + "reqwest 0.12.8", + "schemars", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror", + "tokio", + "url", + "urlpattern", +] + +[[package]] +name = "tauri-plugin-os" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc5f23a86f37687c7f4fecfdc706b279087bc44f7a46702f7307ff1551ee03a" +dependencies = [ + "gethostname", + "log", + "os_info", + "serde", + "serde_json", + "serialize-to-javascript", + "sys-locale", + "tauri", + "tauri-plugin", + "thiserror", +] + +[[package]] +name = "tauri-plugin-process" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae06a00087c148962a52814a2d7265b1a0505bced5ffb74f8c284a5f96a4d03d" +dependencies = [ + "tauri", + "tauri-plugin", +] + +[[package]] +name = "tauri-plugin-shell" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "371fb9aca2823990a2d0db7970573be5fdf07881fcaa2b835b29631feb84aec1" +dependencies = [ + "encoding_rs", + "log", + "open", + "os_pipe", + "regex", + "schemars", + "serde", + "serde_json", + "shared_child", + "tauri", + "tauri-plugin", + "thiserror", + "tokio", +] + +[[package]] +name = "tauri-plugin-single-instance" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a25ac834491d089699a2bc9266a662faf373c9f779f05a2235bc6e4d9e61769a" +dependencies = [ + "log", + "serde", + "serde_json", + "tauri", + "tauri-plugin-deep-link", + "thiserror", + "windows-sys 0.59.0", + "zbus", +] + +[[package]] +name = "tauri-plugin-updater" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd3d2fe0f02bf52eebb5a9d23b987fffac6684646ab6fd683d706dafb18da87" +dependencies = [ + "base64 0.22.1", + "dirs", + "flate2", + "futures-util", + "http 1.1.0", + "infer", + "minisign-verify", + "percent-encoding", + "reqwest 0.12.8", + "semver", + "serde", + "serde_json", + "tar", + "tauri", + "tauri-plugin", + "tempfile", + "thiserror", + "time", + "tokio", + "url", + "windows-sys 0.59.0", + "zip 2.2.0", +] + +[[package]] +name = "tauri-runtime" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af12ad1af974b274ef1d32a94e6eba27a312b429ef28fcb98abc710df7f9151d" +dependencies = [ + "dpi", "gtk", - "http", - "http-range", - "rand 0.8.5", + "http 1.1.0", + "jni", "raw-window-handle", "serde", "serde_json", "tauri-utils", "thiserror", "url", - "uuid", - "webview2-com", - "windows 0.39.0", + "windows", ] [[package]] name = "tauri-runtime-wry" -version = "0.14.9" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c3db170233096aa30330feadcd895bf9317be97e624458560a20e814db7955" +checksum = "e45e88aa0b11b302d836e6ea3e507a6359044c4a8bc86b865ba99868c695753d" dependencies = [ - "cocoa", "gtk", + "http 1.1.0", + "jni", + "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", "percent-encoding", - "rand 0.8.5", "raw-window-handle", + "softbuffer", + "tao", "tauri-runtime", "tauri-utils", - "uuid", + "url", "webkit2gtk", "webview2-com", - "windows 0.39.0", + "windows", "wry", ] [[package]] name = "tauri-utils" -version = "1.6.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2826db448309d382dac14d520f0c0a40839b87b57b977e59cf5f296b3ace6a93" +checksum = "c38b0230d6880cf6dd07b6d7dd7789a0869f98ac12146e0d18d1c1049215a045" dependencies = [ - "brotli 3.5.0", + "brotli", + "cargo_metadata", "ctor", "dunce", "glob", - "heck 0.5.0", "html5ever", "infer", "json-patch", @@ -3781,14 +4732,20 @@ dependencies = [ "phf 0.11.2", "proc-macro2", "quote", + "regex", + "schemars", "semver", "serde", + "serde-untagged", "serde_json", "serde_with", + "swift-rs", "thiserror", + "toml 0.8.2", "url", + "urlpattern", + "uuid", "walkdir", - "windows-version", ] [[package]] @@ -3851,16 +4808,6 @@ dependencies = [ "syn 2.0.74", ] -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - [[package]] name = "tiktoken-rs" version = "0.4.5" @@ -3873,7 +4820,7 @@ dependencies = [ "fancy-regex", "lazy_static", "parking_lot", - "rustc-hash", + "rustc-hash 1.1.0", ] [[package]] @@ -3907,6 +4854,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -3932,10 +4888,11 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", + "tokio-macros", + "tracing", "windows-sys 0.52.0", ] @@ -3949,6 +4906,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "tokio-native-tls" version = "0.3.1" @@ -3965,7 +4933,18 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.14", + "rustls-pki-types", "tokio", ] @@ -3982,15 +4961,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.7.8" @@ -4005,21 +4975,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.20.2", ] [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] @@ -4034,20 +5004,20 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.5.40", + "winnow", ] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -4062,7 +5032,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4086,37 +5055,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", - "valuable", ] [[package]] -name = "tracing-log" -version = "0.2.0" +name = "tray-icon" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +checksum = "533fc2d4105e0e3d96ce1c71f2d308c9fbbe2ef9c587cab63dd627ab5bde218f" dependencies = [ - "log", + "core-graphics", + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", - "tracing-core", + "png", + "serde", + "thiserror", + "windows-sys 0.59.0", ] [[package]] -name = "tracing-subscriber" -version = "0.3.18" +name = "trim-in-place" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] +checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" [[package]] name = "try-lock" @@ -4124,12 +5090,70 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typeid" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[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-bidi" version = "0.3.15" @@ -4170,11 +5194,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", "serde", ] +[[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" @@ -4188,26 +5224,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom 0.2.15", + "serde", ] -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version-compare" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" - [[package]] name = "version-compare" version = "0.2.0" @@ -4351,6 +5376,66 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wayland-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" +dependencies = [ + "cc", + "downcast-rs", + "rustix", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" +dependencies = [ + "bitflags 2.6.0", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" +dependencies = [ + "proc-macro2", + "quick-xml 0.36.2", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" +dependencies = [ + "dlib", + "log", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.70" @@ -4363,9 +5448,9 @@ dependencies = [ [[package]] name = "webkit2gtk" -version = "0.18.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" +checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -4381,20 +5466,18 @@ dependencies = [ "javascriptcore-rs", "libc", "once_cell", - "soup2", + "soup3", "webkit2gtk-sys", ] [[package]] name = "webkit2gtk-sys" -version = "0.18.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" +checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c" dependencies = [ - "atk-sys", "bitflags 1.3.2", "cairo-sys-rs", - "gdk-pixbuf-sys", "gdk-sys", "gio-sys", "glib-sys", @@ -4402,48 +5485,54 @@ dependencies = [ "gtk-sys", "javascriptcore-rs-sys", "libc", - "pango-sys", "pkg-config", - "soup2-sys", - "system-deps 6.2.2", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webpki-roots" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", ] [[package]] name = "webview2-com" -version = "0.19.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178" +checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.39.0", + "windows", + "windows-core 0.58.0", "windows-implement", + "windows-interface", ] [[package]] name = "webview2-com-macros" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" +checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", ] [[package]] name = "webview2-com-sys" -version = "0.19.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac48ef20ddf657755fdcda8dfed2a7b4fc7e4581acce6fe9b88c3d64f29dee7" +checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886" dependencies = [ - "regex", - "serde", - "serde_json", "thiserror", - "windows 0.39.0", - "windows-bindgen", - "windows-metadata", + "windows", + "windows-core 0.58.0", ] [[package]] @@ -4478,49 +5567,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.37.0" +name = "window-vibrancy" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" +checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150" dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", ] [[package]] name = "windows" -version = "0.39.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-implement", - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", -] - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-bindgen" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68003dbd0e38abc0fb85b939240f4bce37c43a5981d3df37ccbaaa981b47cb41" -dependencies = [ - "windows-metadata", - "windows-tokens", + "windows-core 0.58.0", + "windows-targets 0.52.6", ] [[package]] @@ -4533,34 +5600,88 @@ dependencies = [ ] [[package]] -name = "windows-implement" -version = "0.39.0" +name = "windows-core" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "syn 1.0.109", - "windows-tokens", + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings 0.1.0", + "windows-targets 0.52.6", ] [[package]] -name = "windows-metadata" -version = "0.39.0" +name = "windows-implement" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-interface" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" 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", + "proc-macro2", + "quote", + "syn 2.0.74", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings 0.1.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-registry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafa604f2104cf5ae2cc2db1dee84b7e6a5d11b05f737b60def0ffdc398cbc0a" +dependencies = [ + "windows-result", + "windows-strings 0.2.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978d65aedf914c664c510d9de43c8fd85ca745eaff1ed53edf409b479e441663" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -4645,12 +5766,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-tokens" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" - [[package]] name = "windows-version" version = "0.1.1" @@ -4678,18 +5793,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4708,18 +5811,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" - -[[package]] -name = "windows_i686_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4744,18 +5835,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" - -[[package]] -name = "windows_i686_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4774,18 +5853,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4822,18 +5889,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4861,15 +5916,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" -dependencies = [ - "memchr", -] - [[package]] name = "winreg" version = "0.50.0" @@ -4892,40 +5938,42 @@ dependencies = [ [[package]] name = "wry" -version = "0.24.10" +version = "0.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00711278ed357350d44c749c286786ecac644e044e4da410d466212152383b45" +checksum = "440600584cfbd8b0d28eace95c1f2c253db05dae43780b79380aa1e868f04c73" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "block", "cocoa", "core-graphics", "crossbeam-channel", + "dpi", "dunce", - "gdk", - "gio", - "glib", + "gdkx11", "gtk", "html5ever", - "http", + "http 1.1.0", + "javascriptcore-rs", + "jni", "kuchikiki", "libc", - "log", + "ndk", "objc", "objc_id", "once_cell", - "serde", - "serde_json", + "percent-encoding", + "raw-window-handle", "sha2", - "soup2", - "tao", + "soup3", + "tao-macros", "thiserror", - "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.39.0", - "windows-implement", + "windows", + "windows-core 0.58.0", + "windows-version", + "x11-dl", ] [[package]] @@ -4960,6 +6008,81 @@ dependencies = [ "rustix", ] +[[package]] +name = "xdg-home" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "zbus" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "derivative", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tokio", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -4981,6 +6104,12 @@ dependencies = [ "syn 2.0.74", ] +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + [[package]] name = "zip" version = "0.6.6" @@ -4998,7 +6127,22 @@ dependencies = [ "pbkdf2", "sha1", "time", - "zstd 0.11.2+zstd.1.5.2", + "zstd", +] + +[[package]] +name = "zip" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "indexmap 2.4.0", + "memchr", + "thiserror", ] [[package]] @@ -5007,16 +6151,7 @@ version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" -dependencies = [ - "zstd-safe 7.2.1", + "zstd-safe", ] [[package]] @@ -5029,15 +6164,6 @@ dependencies = [ "zstd-sys", ] -[[package]] -name = "zstd-safe" -version = "7.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" -dependencies = [ - "zstd-sys", -] - [[package]] name = "zstd-sys" version = "2.0.13+zstd.1.5.6" @@ -5047,3 +6173,41 @@ dependencies = [ "cc", "pkg-config", ] + +[[package]] +name = "zvariant" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "url", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6c680735..ab68959d 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -10,10 +10,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -tauri-build = { version = "1.4.0", features = [] } +tauri-build = { version = "2", features = [] } [dependencies] -tauri = { version = "1.6.0", features = [ "updater", "app-all", "dialog-all", "fs-all", "http-all", "os-all", "path-all", "process-relaunch", "protocol-all", "reqwest-client", "shell-open", "window-maximize", "window-set-fullscreen"] } +tauri = { version = "2", features = ["protocol-asset"] } serde_json = "1.0" tiktoken-rs = "0.4.0" base64 = "0.21.0" @@ -23,13 +23,26 @@ zip = "0.6.6" tar = "0.4.40" eventsource-client = "0.12.2" futures = "0.3.30" -actix-web = "4.0" -actix-cors = "0.6" -actix-rt = "2.5" url = "2.2" uuid = { version = "1.9.1", features = [ "v4" ] } +tauri-plugin-fs = "2" +tauri-plugin-os = "2" +tauri-plugin-dialog = "2" +tauri-plugin-process = "2" +tauri-plugin-shell = "2" +tauri-plugin-http = "2" +[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\"))".dependencies] +tauri-plugin-deep-link = "2" [features] # this feature is used for production builds or when `devPath` points to the filesystem # DO NOT REMOVE!! custom-protocol = ["tauri/custom-protocol"] + +# [lib] +# name = "alib" +# crate-type = ["staticlib", "cdylib", "rlib", "lib"] + +[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] +tauri-plugin-single-instance = { version = "2.0.0", features = ["deep-link"] } +tauri-plugin-updater = "2" diff --git a/src-tauri/build.rs b/src-tauri/build.rs index 795b9b7c..d860e1e6 100644 --- a/src-tauri/build.rs +++ b/src-tauri/build.rs @@ -1,3 +1,3 @@ fn main() { - tauri_build::build() + tauri_build::build() } diff --git a/src-tauri/capabilities/desktop.json b/src-tauri/capabilities/desktop.json new file mode 100644 index 00000000..b2bdeb87 --- /dev/null +++ b/src-tauri/capabilities/desktop.json @@ -0,0 +1,15 @@ +{ + "identifier": "desktop-capability", + "platforms": [ + "macOS", + "windows", + "linux" + ], + "permissions": [ + "updater:default", + "process:default", + "shell:default", + "http:default", + "deep-link:default" + ] +} \ No newline at end of file diff --git a/src-tauri/capabilities/migrated.json b/src-tauri/capabilities/migrated.json new file mode 100644 index 00000000..c08f013c --- /dev/null +++ b/src-tauri/capabilities/migrated.json @@ -0,0 +1,74 @@ +{ + "identifier": "migrated", + "description": "permissions that were migrated from v1", + "local": true, + "windows": [ + "main" + ], + "permissions": [ + "core:default", + "fs:allow-read-file", + "fs:allow-write-file", + "fs:allow-read-dir", + "fs:allow-copy-file", + "fs:allow-mkdir", + "fs:allow-remove", + "fs:allow-remove", + "fs:allow-rename", + "fs:allow-exists", + { + "identifier": "fs:scope", + "allow": [ + "$APPDATA", + "$APPDATA/*", + "$APPDATA/**/*", + "$DOWNLOAD/*", + "/data/**/*", + "$RESOURCE/*" + ] + }, + "core:window:allow-maximize", + "core:window:allow-set-fullscreen", + "shell:allow-open", + "dialog:allow-open", + "dialog:allow-save", + "dialog:allow-message", + "dialog:allow-ask", + "dialog:allow-confirm", + { + "identifier": "http:default", + "allow": [ + { + "url": "https://*/*" + }, + { + "url": "https://*/**/*" + }, + { + "url": "http://*/*" + }, + { + "url": "http://*/**/*" + } + ] + }, + "os:allow-platform", + "os:allow-version", + "os:allow-os-type", + "os:allow-family", + "os:allow-arch", + "os:allow-exe-extension", + "os:allow-locale", + "os:allow-hostname", + "process:allow-restart", + "core:app:allow-app-show", + "core:app:allow-app-hide", + "fs:default", + "os:default", + "dialog:default", + "process:default", + "shell:default", + "http:default", + "deep-link:default" + ] +} \ No newline at end of file diff --git a/src-tauri/gen/schemas/acl-manifests.json b/src-tauri/gen/schemas/acl-manifests.json new file mode 100644 index 00000000..1849ca1b --- /dev/null +++ b/src-tauri/gen/schemas/acl-manifests.json @@ -0,0 +1 @@ +{"core":{"default_permission":{"identifier":"default","description":"Default core plugins set which includes:\n- 'core:path:default'\n- 'core:event:default'\n- 'core:window:default'\n- 'core:webview:default'\n- 'core:app:default'\n- 'core:image:default'\n- 'core:resources:default'\n- 'core:menu:default'\n- 'core:tray:default'\n","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-set-app-theme":{"identifier":"deny-set-app-theme","description":"Denies the set_app_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_app_theme"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-listen","allow-unlisten","allow-emit","allow-emit-to"]},"permissions":{"allow-emit":{"identifier":"allow-emit","description":"Enables the emit command without any pre-configured scope.","commands":{"allow":["emit"],"deny":[]}},"allow-emit-to":{"identifier":"allow-emit-to","description":"Enables the emit_to command without any pre-configured scope.","commands":{"allow":["emit_to"],"deny":[]}},"allow-listen":{"identifier":"allow-listen","description":"Enables the listen command without any pre-configured scope.","commands":{"allow":["listen"],"deny":[]}},"allow-unlisten":{"identifier":"allow-unlisten","description":"Enables the unlisten command without any pre-configured scope.","commands":{"allow":["unlisten"],"deny":[]}},"deny-emit":{"identifier":"deny-emit","description":"Denies the emit command without any pre-configured scope.","commands":{"allow":[],"deny":["emit"]}},"deny-emit-to":{"identifier":"deny-emit-to","description":"Denies the emit_to command without any pre-configured scope.","commands":{"allow":[],"deny":["emit_to"]}},"deny-listen":{"identifier":"deny-listen","description":"Denies the listen command without any pre-configured scope.","commands":{"allow":[],"deny":["listen"]}},"deny-unlisten":{"identifier":"deny-unlisten","description":"Denies the unlisten command without any pre-configured scope.","commands":{"allow":[],"deny":["unlisten"]}}},"permission_sets":{},"global_scope_schema":null},"core:image":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-new","allow-from-bytes","allow-from-path","allow-rgba","allow-size"]},"permissions":{"allow-from-bytes":{"identifier":"allow-from-bytes","description":"Enables the from_bytes command without any pre-configured scope.","commands":{"allow":["from_bytes"],"deny":[]}},"allow-from-path":{"identifier":"allow-from-path","description":"Enables the from_path command without any pre-configured scope.","commands":{"allow":["from_path"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-rgba":{"identifier":"allow-rgba","description":"Enables the rgba command without any pre-configured scope.","commands":{"allow":["rgba"],"deny":[]}},"allow-size":{"identifier":"allow-size","description":"Enables the size command without any pre-configured scope.","commands":{"allow":["size"],"deny":[]}},"deny-from-bytes":{"identifier":"deny-from-bytes","description":"Denies the from_bytes command without any pre-configured scope.","commands":{"allow":[],"deny":["from_bytes"]}},"deny-from-path":{"identifier":"deny-from-path","description":"Denies the from_path command without any pre-configured scope.","commands":{"allow":[],"deny":["from_path"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-rgba":{"identifier":"deny-rgba","description":"Denies the rgba command without any pre-configured scope.","commands":{"allow":[],"deny":["rgba"]}},"deny-size":{"identifier":"deny-size","description":"Denies the size command without any pre-configured scope.","commands":{"allow":[],"deny":["size"]}}},"permission_sets":{},"global_scope_schema":null},"core:menu":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-new","allow-append","allow-prepend","allow-insert","allow-remove","allow-remove-at","allow-items","allow-get","allow-popup","allow-create-default","allow-set-as-app-menu","allow-set-as-window-menu","allow-text","allow-set-text","allow-is-enabled","allow-set-enabled","allow-set-accelerator","allow-set-as-windows-menu-for-nsapp","allow-set-as-help-menu-for-nsapp","allow-is-checked","allow-set-checked","allow-set-icon"]},"permissions":{"allow-append":{"identifier":"allow-append","description":"Enables the append command without any pre-configured scope.","commands":{"allow":["append"],"deny":[]}},"allow-create-default":{"identifier":"allow-create-default","description":"Enables the create_default command without any pre-configured scope.","commands":{"allow":["create_default"],"deny":[]}},"allow-get":{"identifier":"allow-get","description":"Enables the get command without any pre-configured scope.","commands":{"allow":["get"],"deny":[]}},"allow-insert":{"identifier":"allow-insert","description":"Enables the insert command without any pre-configured scope.","commands":{"allow":["insert"],"deny":[]}},"allow-is-checked":{"identifier":"allow-is-checked","description":"Enables the is_checked command without any pre-configured scope.","commands":{"allow":["is_checked"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-items":{"identifier":"allow-items","description":"Enables the items command without any pre-configured scope.","commands":{"allow":["items"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-popup":{"identifier":"allow-popup","description":"Enables the popup command without any pre-configured scope.","commands":{"allow":["popup"],"deny":[]}},"allow-prepend":{"identifier":"allow-prepend","description":"Enables the prepend command without any pre-configured scope.","commands":{"allow":["prepend"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-remove-at":{"identifier":"allow-remove-at","description":"Enables the remove_at command without any pre-configured scope.","commands":{"allow":["remove_at"],"deny":[]}},"allow-set-accelerator":{"identifier":"allow-set-accelerator","description":"Enables the set_accelerator command without any pre-configured scope.","commands":{"allow":["set_accelerator"],"deny":[]}},"allow-set-as-app-menu":{"identifier":"allow-set-as-app-menu","description":"Enables the set_as_app_menu command without any pre-configured scope.","commands":{"allow":["set_as_app_menu"],"deny":[]}},"allow-set-as-help-menu-for-nsapp":{"identifier":"allow-set-as-help-menu-for-nsapp","description":"Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_help_menu_for_nsapp"],"deny":[]}},"allow-set-as-window-menu":{"identifier":"allow-set-as-window-menu","description":"Enables the set_as_window_menu command without any pre-configured scope.","commands":{"allow":["set_as_window_menu"],"deny":[]}},"allow-set-as-windows-menu-for-nsapp":{"identifier":"allow-set-as-windows-menu-for-nsapp","description":"Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_windows_menu_for_nsapp"],"deny":[]}},"allow-set-checked":{"identifier":"allow-set-checked","description":"Enables the set_checked command without any pre-configured scope.","commands":{"allow":["set_checked"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-text":{"identifier":"allow-set-text","description":"Enables the set_text command without any pre-configured scope.","commands":{"allow":["set_text"],"deny":[]}},"allow-text":{"identifier":"allow-text","description":"Enables the text command without any pre-configured scope.","commands":{"allow":["text"],"deny":[]}},"deny-append":{"identifier":"deny-append","description":"Denies the append command without any pre-configured scope.","commands":{"allow":[],"deny":["append"]}},"deny-create-default":{"identifier":"deny-create-default","description":"Denies the create_default command without any pre-configured scope.","commands":{"allow":[],"deny":["create_default"]}},"deny-get":{"identifier":"deny-get","description":"Denies the get command without any pre-configured scope.","commands":{"allow":[],"deny":["get"]}},"deny-insert":{"identifier":"deny-insert","description":"Denies the insert command without any pre-configured scope.","commands":{"allow":[],"deny":["insert"]}},"deny-is-checked":{"identifier":"deny-is-checked","description":"Denies the is_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["is_checked"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-items":{"identifier":"deny-items","description":"Denies the items command without any pre-configured scope.","commands":{"allow":[],"deny":["items"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-popup":{"identifier":"deny-popup","description":"Denies the popup command without any pre-configured scope.","commands":{"allow":[],"deny":["popup"]}},"deny-prepend":{"identifier":"deny-prepend","description":"Denies the prepend command without any pre-configured scope.","commands":{"allow":[],"deny":["prepend"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-remove-at":{"identifier":"deny-remove-at","description":"Denies the remove_at command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_at"]}},"deny-set-accelerator":{"identifier":"deny-set-accelerator","description":"Denies the set_accelerator command without any pre-configured scope.","commands":{"allow":[],"deny":["set_accelerator"]}},"deny-set-as-app-menu":{"identifier":"deny-set-as-app-menu","description":"Denies the set_as_app_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_app_menu"]}},"deny-set-as-help-menu-for-nsapp":{"identifier":"deny-set-as-help-menu-for-nsapp","description":"Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_help_menu_for_nsapp"]}},"deny-set-as-window-menu":{"identifier":"deny-set-as-window-menu","description":"Denies the set_as_window_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_window_menu"]}},"deny-set-as-windows-menu-for-nsapp":{"identifier":"deny-set-as-windows-menu-for-nsapp","description":"Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_windows_menu_for_nsapp"]}},"deny-set-checked":{"identifier":"deny-set-checked","description":"Denies the set_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["set_checked"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-text":{"identifier":"deny-set-text","description":"Denies the set_text command without any pre-configured scope.","commands":{"allow":[],"deny":["set_text"]}},"deny-text":{"identifier":"deny-text","description":"Denies the text command without any pre-configured scope.","commands":{"allow":[],"deny":["text"]}}},"permission_sets":{},"global_scope_schema":null},"core:path":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-resolve-directory","allow-resolve","allow-normalize","allow-join","allow-dirname","allow-extname","allow-basename","allow-is-absolute"]},"permissions":{"allow-basename":{"identifier":"allow-basename","description":"Enables the basename command without any pre-configured scope.","commands":{"allow":["basename"],"deny":[]}},"allow-dirname":{"identifier":"allow-dirname","description":"Enables the dirname command without any pre-configured scope.","commands":{"allow":["dirname"],"deny":[]}},"allow-extname":{"identifier":"allow-extname","description":"Enables the extname command without any pre-configured scope.","commands":{"allow":["extname"],"deny":[]}},"allow-is-absolute":{"identifier":"allow-is-absolute","description":"Enables the is_absolute command without any pre-configured scope.","commands":{"allow":["is_absolute"],"deny":[]}},"allow-join":{"identifier":"allow-join","description":"Enables the join command without any pre-configured scope.","commands":{"allow":["join"],"deny":[]}},"allow-normalize":{"identifier":"allow-normalize","description":"Enables the normalize command without any pre-configured scope.","commands":{"allow":["normalize"],"deny":[]}},"allow-resolve":{"identifier":"allow-resolve","description":"Enables the resolve command without any pre-configured scope.","commands":{"allow":["resolve"],"deny":[]}},"allow-resolve-directory":{"identifier":"allow-resolve-directory","description":"Enables the resolve_directory command without any pre-configured scope.","commands":{"allow":["resolve_directory"],"deny":[]}},"deny-basename":{"identifier":"deny-basename","description":"Denies the basename command without any pre-configured scope.","commands":{"allow":[],"deny":["basename"]}},"deny-dirname":{"identifier":"deny-dirname","description":"Denies the dirname command without any pre-configured scope.","commands":{"allow":[],"deny":["dirname"]}},"deny-extname":{"identifier":"deny-extname","description":"Denies the extname command without any pre-configured scope.","commands":{"allow":[],"deny":["extname"]}},"deny-is-absolute":{"identifier":"deny-is-absolute","description":"Denies the is_absolute command without any pre-configured scope.","commands":{"allow":[],"deny":["is_absolute"]}},"deny-join":{"identifier":"deny-join","description":"Denies the join command without any pre-configured scope.","commands":{"allow":[],"deny":["join"]}},"deny-normalize":{"identifier":"deny-normalize","description":"Denies the normalize command without any pre-configured scope.","commands":{"allow":[],"deny":["normalize"]}},"deny-resolve":{"identifier":"deny-resolve","description":"Denies the resolve command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve"]}},"deny-resolve-directory":{"identifier":"deny-resolve-directory","description":"Denies the resolve_directory command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve_directory"]}}},"permission_sets":{},"global_scope_schema":null},"core:resources":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-close"]},"permissions":{"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}}},"permission_sets":{},"global_scope_schema":null},"core:tray":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-new","allow-get-by-id","allow-remove-by-id","allow-set-icon","allow-set-menu","allow-set-tooltip","allow-set-title","allow-set-visible","allow-set-temp-dir-path","allow-set-icon-as-template","allow-set-show-menu-on-left-click"]},"permissions":{"allow-get-by-id":{"identifier":"allow-get-by-id","description":"Enables the get_by_id command without any pre-configured scope.","commands":{"allow":["get_by_id"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-remove-by-id":{"identifier":"allow-remove-by-id","description":"Enables the remove_by_id command without any pre-configured scope.","commands":{"allow":["remove_by_id"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-icon-as-template":{"identifier":"allow-set-icon-as-template","description":"Enables the set_icon_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_as_template"],"deny":[]}},"allow-set-menu":{"identifier":"allow-set-menu","description":"Enables the set_menu command without any pre-configured scope.","commands":{"allow":["set_menu"],"deny":[]}},"allow-set-show-menu-on-left-click":{"identifier":"allow-set-show-menu-on-left-click","description":"Enables the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":["set_show_menu_on_left_click"],"deny":[]}},"allow-set-temp-dir-path":{"identifier":"allow-set-temp-dir-path","description":"Enables the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":["set_temp_dir_path"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-tooltip":{"identifier":"allow-set-tooltip","description":"Enables the set_tooltip command without any pre-configured scope.","commands":{"allow":["set_tooltip"],"deny":[]}},"allow-set-visible":{"identifier":"allow-set-visible","description":"Enables the set_visible command without any pre-configured scope.","commands":{"allow":["set_visible"],"deny":[]}},"deny-get-by-id":{"identifier":"deny-get-by-id","description":"Denies the get_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["get_by_id"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-remove-by-id":{"identifier":"deny-remove-by-id","description":"Denies the remove_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_by_id"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-icon-as-template":{"identifier":"deny-set-icon-as-template","description":"Denies the set_icon_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_as_template"]}},"deny-set-menu":{"identifier":"deny-set-menu","description":"Denies the set_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_menu"]}},"deny-set-show-menu-on-left-click":{"identifier":"deny-set-show-menu-on-left-click","description":"Denies the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":[],"deny":["set_show_menu_on_left_click"]}},"deny-set-temp-dir-path":{"identifier":"deny-set-temp-dir-path","description":"Denies the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":[],"deny":["set_temp_dir_path"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-tooltip":{"identifier":"deny-set-tooltip","description":"Denies the set_tooltip command without any pre-configured scope.","commands":{"allow":[],"deny":["set_tooltip"]}},"deny-set-visible":{"identifier":"deny-set-visible","description":"Denies the set_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible"]}}},"permission_sets":{},"global_scope_schema":null},"core:webview":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-webviews","allow-webview-position","allow-webview-size","allow-internal-toggle-devtools"]},"permissions":{"allow-clear-all-browsing-data":{"identifier":"allow-clear-all-browsing-data","description":"Enables the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":["clear_all_browsing_data"],"deny":[]}},"allow-create-webview":{"identifier":"allow-create-webview","description":"Enables the create_webview command without any pre-configured scope.","commands":{"allow":["create_webview"],"deny":[]}},"allow-create-webview-window":{"identifier":"allow-create-webview-window","description":"Enables the create_webview_window command without any pre-configured scope.","commands":{"allow":["create_webview_window"],"deny":[]}},"allow-get-all-webviews":{"identifier":"allow-get-all-webviews","description":"Enables the get_all_webviews command without any pre-configured scope.","commands":{"allow":["get_all_webviews"],"deny":[]}},"allow-internal-toggle-devtools":{"identifier":"allow-internal-toggle-devtools","description":"Enables the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":["internal_toggle_devtools"],"deny":[]}},"allow-print":{"identifier":"allow-print","description":"Enables the print command without any pre-configured scope.","commands":{"allow":["print"],"deny":[]}},"allow-reparent":{"identifier":"allow-reparent","description":"Enables the reparent command without any pre-configured scope.","commands":{"allow":["reparent"],"deny":[]}},"allow-set-webview-focus":{"identifier":"allow-set-webview-focus","description":"Enables the set_webview_focus command without any pre-configured scope.","commands":{"allow":["set_webview_focus"],"deny":[]}},"allow-set-webview-position":{"identifier":"allow-set-webview-position","description":"Enables the set_webview_position command without any pre-configured scope.","commands":{"allow":["set_webview_position"],"deny":[]}},"allow-set-webview-size":{"identifier":"allow-set-webview-size","description":"Enables the set_webview_size command without any pre-configured scope.","commands":{"allow":["set_webview_size"],"deny":[]}},"allow-set-webview-zoom":{"identifier":"allow-set-webview-zoom","description":"Enables the set_webview_zoom command without any pre-configured scope.","commands":{"allow":["set_webview_zoom"],"deny":[]}},"allow-webview-close":{"identifier":"allow-webview-close","description":"Enables the webview_close command without any pre-configured scope.","commands":{"allow":["webview_close"],"deny":[]}},"allow-webview-hide":{"identifier":"allow-webview-hide","description":"Enables the webview_hide command without any pre-configured scope.","commands":{"allow":["webview_hide"],"deny":[]}},"allow-webview-position":{"identifier":"allow-webview-position","description":"Enables the webview_position command without any pre-configured scope.","commands":{"allow":["webview_position"],"deny":[]}},"allow-webview-show":{"identifier":"allow-webview-show","description":"Enables the webview_show command without any pre-configured scope.","commands":{"allow":["webview_show"],"deny":[]}},"allow-webview-size":{"identifier":"allow-webview-size","description":"Enables the webview_size command without any pre-configured scope.","commands":{"allow":["webview_size"],"deny":[]}},"deny-clear-all-browsing-data":{"identifier":"deny-clear-all-browsing-data","description":"Denies the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_all_browsing_data"]}},"deny-create-webview":{"identifier":"deny-create-webview","description":"Denies the create_webview command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview"]}},"deny-create-webview-window":{"identifier":"deny-create-webview-window","description":"Denies the create_webview_window command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview_window"]}},"deny-get-all-webviews":{"identifier":"deny-get-all-webviews","description":"Denies the get_all_webviews command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_webviews"]}},"deny-internal-toggle-devtools":{"identifier":"deny-internal-toggle-devtools","description":"Denies the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_devtools"]}},"deny-print":{"identifier":"deny-print","description":"Denies the print command without any pre-configured scope.","commands":{"allow":[],"deny":["print"]}},"deny-reparent":{"identifier":"deny-reparent","description":"Denies the reparent command without any pre-configured scope.","commands":{"allow":[],"deny":["reparent"]}},"deny-set-webview-focus":{"identifier":"deny-set-webview-focus","description":"Denies the set_webview_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_focus"]}},"deny-set-webview-position":{"identifier":"deny-set-webview-position","description":"Denies the set_webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_position"]}},"deny-set-webview-size":{"identifier":"deny-set-webview-size","description":"Denies the set_webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_size"]}},"deny-set-webview-zoom":{"identifier":"deny-set-webview-zoom","description":"Denies the set_webview_zoom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_zoom"]}},"deny-webview-close":{"identifier":"deny-webview-close","description":"Denies the webview_close command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_close"]}},"deny-webview-hide":{"identifier":"deny-webview-hide","description":"Denies the webview_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_hide"]}},"deny-webview-position":{"identifier":"deny-webview-position","description":"Denies the webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_position"]}},"deny-webview-show":{"identifier":"deny-webview-show","description":"Denies the webview_show command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_show"]}},"deny-webview-size":{"identifier":"deny-webview-size","description":"Denies the webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_size"]}}},"permission_sets":{},"global_scope_schema":null},"core:window":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-windows","allow-scale-factor","allow-inner-position","allow-outer-position","allow-inner-size","allow-outer-size","allow-is-fullscreen","allow-is-minimized","allow-is-maximized","allow-is-focused","allow-is-decorated","allow-is-resizable","allow-is-maximizable","allow-is-minimizable","allow-is-closable","allow-is-visible","allow-is-enabled","allow-title","allow-current-monitor","allow-primary-monitor","allow-monitor-from-point","allow-available-monitors","allow-cursor-position","allow-theme","allow-internal-toggle-maximize"]},"permissions":{"allow-available-monitors":{"identifier":"allow-available-monitors","description":"Enables the available_monitors command without any pre-configured scope.","commands":{"allow":["available_monitors"],"deny":[]}},"allow-center":{"identifier":"allow-center","description":"Enables the center command without any pre-configured scope.","commands":{"allow":["center"],"deny":[]}},"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-current-monitor":{"identifier":"allow-current-monitor","description":"Enables the current_monitor command without any pre-configured scope.","commands":{"allow":["current_monitor"],"deny":[]}},"allow-cursor-position":{"identifier":"allow-cursor-position","description":"Enables the cursor_position command without any pre-configured scope.","commands":{"allow":["cursor_position"],"deny":[]}},"allow-destroy":{"identifier":"allow-destroy","description":"Enables the destroy command without any pre-configured scope.","commands":{"allow":["destroy"],"deny":[]}},"allow-get-all-windows":{"identifier":"allow-get-all-windows","description":"Enables the get_all_windows command without any pre-configured scope.","commands":{"allow":["get_all_windows"],"deny":[]}},"allow-hide":{"identifier":"allow-hide","description":"Enables the hide command without any pre-configured scope.","commands":{"allow":["hide"],"deny":[]}},"allow-inner-position":{"identifier":"allow-inner-position","description":"Enables the inner_position command without any pre-configured scope.","commands":{"allow":["inner_position"],"deny":[]}},"allow-inner-size":{"identifier":"allow-inner-size","description":"Enables the inner_size command without any pre-configured scope.","commands":{"allow":["inner_size"],"deny":[]}},"allow-internal-toggle-maximize":{"identifier":"allow-internal-toggle-maximize","description":"Enables the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":["internal_toggle_maximize"],"deny":[]}},"allow-is-closable":{"identifier":"allow-is-closable","description":"Enables the is_closable command without any pre-configured scope.","commands":{"allow":["is_closable"],"deny":[]}},"allow-is-decorated":{"identifier":"allow-is-decorated","description":"Enables the is_decorated command without any pre-configured scope.","commands":{"allow":["is_decorated"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-is-focused":{"identifier":"allow-is-focused","description":"Enables the is_focused command without any pre-configured scope.","commands":{"allow":["is_focused"],"deny":[]}},"allow-is-fullscreen":{"identifier":"allow-is-fullscreen","description":"Enables the is_fullscreen command without any pre-configured scope.","commands":{"allow":["is_fullscreen"],"deny":[]}},"allow-is-maximizable":{"identifier":"allow-is-maximizable","description":"Enables the is_maximizable command without any pre-configured scope.","commands":{"allow":["is_maximizable"],"deny":[]}},"allow-is-maximized":{"identifier":"allow-is-maximized","description":"Enables the is_maximized command without any pre-configured scope.","commands":{"allow":["is_maximized"],"deny":[]}},"allow-is-minimizable":{"identifier":"allow-is-minimizable","description":"Enables the is_minimizable command without any pre-configured scope.","commands":{"allow":["is_minimizable"],"deny":[]}},"allow-is-minimized":{"identifier":"allow-is-minimized","description":"Enables the is_minimized command without any pre-configured scope.","commands":{"allow":["is_minimized"],"deny":[]}},"allow-is-resizable":{"identifier":"allow-is-resizable","description":"Enables the is_resizable command without any pre-configured scope.","commands":{"allow":["is_resizable"],"deny":[]}},"allow-is-visible":{"identifier":"allow-is-visible","description":"Enables the is_visible command without any pre-configured scope.","commands":{"allow":["is_visible"],"deny":[]}},"allow-maximize":{"identifier":"allow-maximize","description":"Enables the maximize command without any pre-configured scope.","commands":{"allow":["maximize"],"deny":[]}},"allow-minimize":{"identifier":"allow-minimize","description":"Enables the minimize command without any pre-configured scope.","commands":{"allow":["minimize"],"deny":[]}},"allow-monitor-from-point":{"identifier":"allow-monitor-from-point","description":"Enables the monitor_from_point command without any pre-configured scope.","commands":{"allow":["monitor_from_point"],"deny":[]}},"allow-outer-position":{"identifier":"allow-outer-position","description":"Enables the outer_position command without any pre-configured scope.","commands":{"allow":["outer_position"],"deny":[]}},"allow-outer-size":{"identifier":"allow-outer-size","description":"Enables the outer_size command without any pre-configured scope.","commands":{"allow":["outer_size"],"deny":[]}},"allow-primary-monitor":{"identifier":"allow-primary-monitor","description":"Enables the primary_monitor command without any pre-configured scope.","commands":{"allow":["primary_monitor"],"deny":[]}},"allow-request-user-attention":{"identifier":"allow-request-user-attention","description":"Enables the request_user_attention command without any pre-configured scope.","commands":{"allow":["request_user_attention"],"deny":[]}},"allow-scale-factor":{"identifier":"allow-scale-factor","description":"Enables the scale_factor command without any pre-configured scope.","commands":{"allow":["scale_factor"],"deny":[]}},"allow-set-always-on-bottom":{"identifier":"allow-set-always-on-bottom","description":"Enables the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":["set_always_on_bottom"],"deny":[]}},"allow-set-always-on-top":{"identifier":"allow-set-always-on-top","description":"Enables the set_always_on_top command without any pre-configured scope.","commands":{"allow":["set_always_on_top"],"deny":[]}},"allow-set-closable":{"identifier":"allow-set-closable","description":"Enables the set_closable command without any pre-configured scope.","commands":{"allow":["set_closable"],"deny":[]}},"allow-set-content-protected":{"identifier":"allow-set-content-protected","description":"Enables the set_content_protected command without any pre-configured scope.","commands":{"allow":["set_content_protected"],"deny":[]}},"allow-set-cursor-grab":{"identifier":"allow-set-cursor-grab","description":"Enables the set_cursor_grab command without any pre-configured scope.","commands":{"allow":["set_cursor_grab"],"deny":[]}},"allow-set-cursor-icon":{"identifier":"allow-set-cursor-icon","description":"Enables the set_cursor_icon command without any pre-configured scope.","commands":{"allow":["set_cursor_icon"],"deny":[]}},"allow-set-cursor-position":{"identifier":"allow-set-cursor-position","description":"Enables the set_cursor_position command without any pre-configured scope.","commands":{"allow":["set_cursor_position"],"deny":[]}},"allow-set-cursor-visible":{"identifier":"allow-set-cursor-visible","description":"Enables the set_cursor_visible command without any pre-configured scope.","commands":{"allow":["set_cursor_visible"],"deny":[]}},"allow-set-decorations":{"identifier":"allow-set-decorations","description":"Enables the set_decorations command without any pre-configured scope.","commands":{"allow":["set_decorations"],"deny":[]}},"allow-set-effects":{"identifier":"allow-set-effects","description":"Enables the set_effects command without any pre-configured scope.","commands":{"allow":["set_effects"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-focus":{"identifier":"allow-set-focus","description":"Enables the set_focus command without any pre-configured scope.","commands":{"allow":["set_focus"],"deny":[]}},"allow-set-fullscreen":{"identifier":"allow-set-fullscreen","description":"Enables the set_fullscreen command without any pre-configured scope.","commands":{"allow":["set_fullscreen"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-ignore-cursor-events":{"identifier":"allow-set-ignore-cursor-events","description":"Enables the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":["set_ignore_cursor_events"],"deny":[]}},"allow-set-max-size":{"identifier":"allow-set-max-size","description":"Enables the set_max_size command without any pre-configured scope.","commands":{"allow":["set_max_size"],"deny":[]}},"allow-set-maximizable":{"identifier":"allow-set-maximizable","description":"Enables the set_maximizable command without any pre-configured scope.","commands":{"allow":["set_maximizable"],"deny":[]}},"allow-set-min-size":{"identifier":"allow-set-min-size","description":"Enables the set_min_size command without any pre-configured scope.","commands":{"allow":["set_min_size"],"deny":[]}},"allow-set-minimizable":{"identifier":"allow-set-minimizable","description":"Enables the set_minimizable command without any pre-configured scope.","commands":{"allow":["set_minimizable"],"deny":[]}},"allow-set-position":{"identifier":"allow-set-position","description":"Enables the set_position command without any pre-configured scope.","commands":{"allow":["set_position"],"deny":[]}},"allow-set-progress-bar":{"identifier":"allow-set-progress-bar","description":"Enables the set_progress_bar command without any pre-configured scope.","commands":{"allow":["set_progress_bar"],"deny":[]}},"allow-set-resizable":{"identifier":"allow-set-resizable","description":"Enables the set_resizable command without any pre-configured scope.","commands":{"allow":["set_resizable"],"deny":[]}},"allow-set-shadow":{"identifier":"allow-set-shadow","description":"Enables the set_shadow command without any pre-configured scope.","commands":{"allow":["set_shadow"],"deny":[]}},"allow-set-size":{"identifier":"allow-set-size","description":"Enables the set_size command without any pre-configured scope.","commands":{"allow":["set_size"],"deny":[]}},"allow-set-size-constraints":{"identifier":"allow-set-size-constraints","description":"Enables the set_size_constraints command without any pre-configured scope.","commands":{"allow":["set_size_constraints"],"deny":[]}},"allow-set-skip-taskbar":{"identifier":"allow-set-skip-taskbar","description":"Enables the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":["set_skip_taskbar"],"deny":[]}},"allow-set-theme":{"identifier":"allow-set-theme","description":"Enables the set_theme command without any pre-configured scope.","commands":{"allow":["set_theme"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-title-bar-style":{"identifier":"allow-set-title-bar-style","description":"Enables the set_title_bar_style command without any pre-configured scope.","commands":{"allow":["set_title_bar_style"],"deny":[]}},"allow-set-visible-on-all-workspaces":{"identifier":"allow-set-visible-on-all-workspaces","description":"Enables the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":["set_visible_on_all_workspaces"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"allow-start-dragging":{"identifier":"allow-start-dragging","description":"Enables the start_dragging command without any pre-configured scope.","commands":{"allow":["start_dragging"],"deny":[]}},"allow-start-resize-dragging":{"identifier":"allow-start-resize-dragging","description":"Enables the start_resize_dragging command without any pre-configured scope.","commands":{"allow":["start_resize_dragging"],"deny":[]}},"allow-theme":{"identifier":"allow-theme","description":"Enables the theme command without any pre-configured scope.","commands":{"allow":["theme"],"deny":[]}},"allow-title":{"identifier":"allow-title","description":"Enables the title command without any pre-configured scope.","commands":{"allow":["title"],"deny":[]}},"allow-toggle-maximize":{"identifier":"allow-toggle-maximize","description":"Enables the toggle_maximize command without any pre-configured scope.","commands":{"allow":["toggle_maximize"],"deny":[]}},"allow-unmaximize":{"identifier":"allow-unmaximize","description":"Enables the unmaximize command without any pre-configured scope.","commands":{"allow":["unmaximize"],"deny":[]}},"allow-unminimize":{"identifier":"allow-unminimize","description":"Enables the unminimize command without any pre-configured scope.","commands":{"allow":["unminimize"],"deny":[]}},"deny-available-monitors":{"identifier":"deny-available-monitors","description":"Denies the available_monitors command without any pre-configured scope.","commands":{"allow":[],"deny":["available_monitors"]}},"deny-center":{"identifier":"deny-center","description":"Denies the center command without any pre-configured scope.","commands":{"allow":[],"deny":["center"]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-current-monitor":{"identifier":"deny-current-monitor","description":"Denies the current_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["current_monitor"]}},"deny-cursor-position":{"identifier":"deny-cursor-position","description":"Denies the cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["cursor_position"]}},"deny-destroy":{"identifier":"deny-destroy","description":"Denies the destroy command without any pre-configured scope.","commands":{"allow":[],"deny":["destroy"]}},"deny-get-all-windows":{"identifier":"deny-get-all-windows","description":"Denies the get_all_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_windows"]}},"deny-hide":{"identifier":"deny-hide","description":"Denies the hide command without any pre-configured scope.","commands":{"allow":[],"deny":["hide"]}},"deny-inner-position":{"identifier":"deny-inner-position","description":"Denies the inner_position command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_position"]}},"deny-inner-size":{"identifier":"deny-inner-size","description":"Denies the inner_size command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_size"]}},"deny-internal-toggle-maximize":{"identifier":"deny-internal-toggle-maximize","description":"Denies the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_maximize"]}},"deny-is-closable":{"identifier":"deny-is-closable","description":"Denies the is_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_closable"]}},"deny-is-decorated":{"identifier":"deny-is-decorated","description":"Denies the is_decorated command without any pre-configured scope.","commands":{"allow":[],"deny":["is_decorated"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-is-focused":{"identifier":"deny-is-focused","description":"Denies the is_focused command without any pre-configured scope.","commands":{"allow":[],"deny":["is_focused"]}},"deny-is-fullscreen":{"identifier":"deny-is-fullscreen","description":"Denies the is_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["is_fullscreen"]}},"deny-is-maximizable":{"identifier":"deny-is-maximizable","description":"Denies the is_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximizable"]}},"deny-is-maximized":{"identifier":"deny-is-maximized","description":"Denies the is_maximized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximized"]}},"deny-is-minimizable":{"identifier":"deny-is-minimizable","description":"Denies the is_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimizable"]}},"deny-is-minimized":{"identifier":"deny-is-minimized","description":"Denies the is_minimized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimized"]}},"deny-is-resizable":{"identifier":"deny-is-resizable","description":"Denies the is_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_resizable"]}},"deny-is-visible":{"identifier":"deny-is-visible","description":"Denies the is_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["is_visible"]}},"deny-maximize":{"identifier":"deny-maximize","description":"Denies the maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["maximize"]}},"deny-minimize":{"identifier":"deny-minimize","description":"Denies the minimize command without any pre-configured scope.","commands":{"allow":[],"deny":["minimize"]}},"deny-monitor-from-point":{"identifier":"deny-monitor-from-point","description":"Denies the monitor_from_point command without any pre-configured scope.","commands":{"allow":[],"deny":["monitor_from_point"]}},"deny-outer-position":{"identifier":"deny-outer-position","description":"Denies the outer_position command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_position"]}},"deny-outer-size":{"identifier":"deny-outer-size","description":"Denies the outer_size command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_size"]}},"deny-primary-monitor":{"identifier":"deny-primary-monitor","description":"Denies the primary_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["primary_monitor"]}},"deny-request-user-attention":{"identifier":"deny-request-user-attention","description":"Denies the request_user_attention command without any pre-configured scope.","commands":{"allow":[],"deny":["request_user_attention"]}},"deny-scale-factor":{"identifier":"deny-scale-factor","description":"Denies the scale_factor command without any pre-configured scope.","commands":{"allow":[],"deny":["scale_factor"]}},"deny-set-always-on-bottom":{"identifier":"deny-set-always-on-bottom","description":"Denies the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_bottom"]}},"deny-set-always-on-top":{"identifier":"deny-set-always-on-top","description":"Denies the set_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_top"]}},"deny-set-closable":{"identifier":"deny-set-closable","description":"Denies the set_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_closable"]}},"deny-set-content-protected":{"identifier":"deny-set-content-protected","description":"Denies the set_content_protected command without any pre-configured scope.","commands":{"allow":[],"deny":["set_content_protected"]}},"deny-set-cursor-grab":{"identifier":"deny-set-cursor-grab","description":"Denies the set_cursor_grab command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_grab"]}},"deny-set-cursor-icon":{"identifier":"deny-set-cursor-icon","description":"Denies the set_cursor_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_icon"]}},"deny-set-cursor-position":{"identifier":"deny-set-cursor-position","description":"Denies the set_cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_position"]}},"deny-set-cursor-visible":{"identifier":"deny-set-cursor-visible","description":"Denies the set_cursor_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_visible"]}},"deny-set-decorations":{"identifier":"deny-set-decorations","description":"Denies the set_decorations command without any pre-configured scope.","commands":{"allow":[],"deny":["set_decorations"]}},"deny-set-effects":{"identifier":"deny-set-effects","description":"Denies the set_effects command without any pre-configured scope.","commands":{"allow":[],"deny":["set_effects"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-focus":{"identifier":"deny-set-focus","description":"Denies the set_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focus"]}},"deny-set-fullscreen":{"identifier":"deny-set-fullscreen","description":"Denies the set_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-ignore-cursor-events":{"identifier":"deny-set-ignore-cursor-events","description":"Denies the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":[],"deny":["set_ignore_cursor_events"]}},"deny-set-max-size":{"identifier":"deny-set-max-size","description":"Denies the set_max_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_max_size"]}},"deny-set-maximizable":{"identifier":"deny-set-maximizable","description":"Denies the set_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_maximizable"]}},"deny-set-min-size":{"identifier":"deny-set-min-size","description":"Denies the set_min_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_min_size"]}},"deny-set-minimizable":{"identifier":"deny-set-minimizable","description":"Denies the set_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_minimizable"]}},"deny-set-position":{"identifier":"deny-set-position","description":"Denies the set_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_position"]}},"deny-set-progress-bar":{"identifier":"deny-set-progress-bar","description":"Denies the set_progress_bar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_progress_bar"]}},"deny-set-resizable":{"identifier":"deny-set-resizable","description":"Denies the set_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_resizable"]}},"deny-set-shadow":{"identifier":"deny-set-shadow","description":"Denies the set_shadow command without any pre-configured scope.","commands":{"allow":[],"deny":["set_shadow"]}},"deny-set-size":{"identifier":"deny-set-size","description":"Denies the set_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size"]}},"deny-set-size-constraints":{"identifier":"deny-set-size-constraints","description":"Denies the set_size_constraints command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size_constraints"]}},"deny-set-skip-taskbar":{"identifier":"deny-set-skip-taskbar","description":"Denies the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_skip_taskbar"]}},"deny-set-theme":{"identifier":"deny-set-theme","description":"Denies the set_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_theme"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-title-bar-style":{"identifier":"deny-set-title-bar-style","description":"Denies the set_title_bar_style command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title_bar_style"]}},"deny-set-visible-on-all-workspaces":{"identifier":"deny-set-visible-on-all-workspaces","description":"Denies the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible_on_all_workspaces"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}},"deny-start-dragging":{"identifier":"deny-start-dragging","description":"Denies the start_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_dragging"]}},"deny-start-resize-dragging":{"identifier":"deny-start-resize-dragging","description":"Denies the start_resize_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_resize_dragging"]}},"deny-theme":{"identifier":"deny-theme","description":"Denies the theme command without any pre-configured scope.","commands":{"allow":[],"deny":["theme"]}},"deny-title":{"identifier":"deny-title","description":"Denies the title command without any pre-configured scope.","commands":{"allow":[],"deny":["title"]}},"deny-toggle-maximize":{"identifier":"deny-toggle-maximize","description":"Denies the toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["toggle_maximize"]}},"deny-unmaximize":{"identifier":"deny-unmaximize","description":"Denies the unmaximize command without any pre-configured scope.","commands":{"allow":[],"deny":["unmaximize"]}},"deny-unminimize":{"identifier":"deny-unminimize","description":"Denies the unminimize command without any pre-configured scope.","commands":{"allow":[],"deny":["unminimize"]}}},"permission_sets":{},"global_scope_schema":null},"deep-link":{"default_permission":{"identifier":"default","description":"Allows reading the opened deep link via the get_current command","permissions":["allow-get-current"]},"permissions":{"allow-get-current":{"identifier":"allow-get-current","description":"Enables the get_current command without any pre-configured scope.","commands":{"allow":["get_current"],"deny":[]}},"allow-is-registered":{"identifier":"allow-is-registered","description":"Enables the is_registered command without any pre-configured scope.","commands":{"allow":["is_registered"],"deny":[]}},"allow-register":{"identifier":"allow-register","description":"Enables the register command without any pre-configured scope.","commands":{"allow":["register"],"deny":[]}},"allow-unregister":{"identifier":"allow-unregister","description":"Enables the unregister command without any pre-configured scope.","commands":{"allow":["unregister"],"deny":[]}},"deny-get-current":{"identifier":"deny-get-current","description":"Denies the get_current command without any pre-configured scope.","commands":{"allow":[],"deny":["get_current"]}},"deny-is-registered":{"identifier":"deny-is-registered","description":"Denies the is_registered command without any pre-configured scope.","commands":{"allow":[],"deny":["is_registered"]}},"deny-register":{"identifier":"deny-register","description":"Denies the register command without any pre-configured scope.","commands":{"allow":[],"deny":["register"]}},"deny-unregister":{"identifier":"deny-unregister","description":"Denies the unregister command without any pre-configured scope.","commands":{"allow":[],"deny":["unregister"]}}},"permission_sets":{},"global_scope_schema":null},"dialog":{"default_permission":{"identifier":"default","description":"This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n","permissions":["allow-ask","allow-confirm","allow-message","allow-save","allow-open"]},"permissions":{"allow-ask":{"identifier":"allow-ask","description":"Enables the ask command without any pre-configured scope.","commands":{"allow":["ask"],"deny":[]}},"allow-confirm":{"identifier":"allow-confirm","description":"Enables the confirm command without any pre-configured scope.","commands":{"allow":["confirm"],"deny":[]}},"allow-message":{"identifier":"allow-message","description":"Enables the message command without any pre-configured scope.","commands":{"allow":["message"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-save":{"identifier":"allow-save","description":"Enables the save command without any pre-configured scope.","commands":{"allow":["save"],"deny":[]}},"deny-ask":{"identifier":"deny-ask","description":"Denies the ask command without any pre-configured scope.","commands":{"allow":[],"deny":["ask"]}},"deny-confirm":{"identifier":"deny-confirm","description":"Denies the confirm command without any pre-configured scope.","commands":{"allow":[],"deny":["confirm"]}},"deny-message":{"identifier":"deny-message","description":"Denies the message command without any pre-configured scope.","commands":{"allow":[],"deny":["message"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-save":{"identifier":"deny-save","description":"Denies the save command without any pre-configured scope.","commands":{"allow":[],"deny":["save"]}}},"permission_sets":{},"global_scope_schema":null},"fs":{"default_permission":{"identifier":"default","description":"This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n","permissions":["create-app-specific-dirs","read-app-specific-dirs-recursive","deny-default"]},"permissions":{"allow-copy-file":{"identifier":"allow-copy-file","description":"Enables the copy_file command without any pre-configured scope.","commands":{"allow":["copy_file"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-exists":{"identifier":"allow-exists","description":"Enables the exists command without any pre-configured scope.","commands":{"allow":["exists"],"deny":[]}},"allow-fstat":{"identifier":"allow-fstat","description":"Enables the fstat command without any pre-configured scope.","commands":{"allow":["fstat"],"deny":[]}},"allow-ftruncate":{"identifier":"allow-ftruncate","description":"Enables the ftruncate command without any pre-configured scope.","commands":{"allow":["ftruncate"],"deny":[]}},"allow-lstat":{"identifier":"allow-lstat","description":"Enables the lstat command without any pre-configured scope.","commands":{"allow":["lstat"],"deny":[]}},"allow-mkdir":{"identifier":"allow-mkdir","description":"Enables the mkdir command without any pre-configured scope.","commands":{"allow":["mkdir"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-read":{"identifier":"allow-read","description":"Enables the read command without any pre-configured scope.","commands":{"allow":["read"],"deny":[]}},"allow-read-dir":{"identifier":"allow-read-dir","description":"Enables the read_dir command without any pre-configured scope.","commands":{"allow":["read_dir"],"deny":[]}},"allow-read-file":{"identifier":"allow-read-file","description":"Enables the read_file command without any pre-configured scope.","commands":{"allow":["read_file"],"deny":[]}},"allow-read-text-file":{"identifier":"allow-read-text-file","description":"Enables the read_text_file command without any pre-configured scope.","commands":{"allow":["read_text_file"],"deny":[]}},"allow-read-text-file-lines":{"identifier":"allow-read-text-file-lines","description":"Enables the read_text_file_lines command without any pre-configured scope.","commands":{"allow":["read_text_file_lines"],"deny":[]}},"allow-read-text-file-lines-next":{"identifier":"allow-read-text-file-lines-next","description":"Enables the read_text_file_lines_next command without any pre-configured scope.","commands":{"allow":["read_text_file_lines_next"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-rename":{"identifier":"allow-rename","description":"Enables the rename command without any pre-configured scope.","commands":{"allow":["rename"],"deny":[]}},"allow-seek":{"identifier":"allow-seek","description":"Enables the seek command without any pre-configured scope.","commands":{"allow":["seek"],"deny":[]}},"allow-stat":{"identifier":"allow-stat","description":"Enables the stat command without any pre-configured scope.","commands":{"allow":["stat"],"deny":[]}},"allow-truncate":{"identifier":"allow-truncate","description":"Enables the truncate command without any pre-configured scope.","commands":{"allow":["truncate"],"deny":[]}},"allow-unwatch":{"identifier":"allow-unwatch","description":"Enables the unwatch command without any pre-configured scope.","commands":{"allow":["unwatch"],"deny":[]}},"allow-watch":{"identifier":"allow-watch","description":"Enables the watch command without any pre-configured scope.","commands":{"allow":["watch"],"deny":[]}},"allow-write":{"identifier":"allow-write","description":"Enables the write command without any pre-configured scope.","commands":{"allow":["write"],"deny":[]}},"allow-write-file":{"identifier":"allow-write-file","description":"Enables the write_file command without any pre-configured scope.","commands":{"allow":["write_file"],"deny":[]}},"allow-write-text-file":{"identifier":"allow-write-text-file","description":"Enables the write_text_file command without any pre-configured scope.","commands":{"allow":["write_text_file"],"deny":[]}},"create-app-specific-dirs":{"identifier":"create-app-specific-dirs","description":"This permissions allows to create the application specific directories.\n","commands":{"allow":["mkdir","scope-app-index"],"deny":[]}},"deny-copy-file":{"identifier":"deny-copy-file","description":"Denies the copy_file command without any pre-configured scope.","commands":{"allow":[],"deny":["copy_file"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-exists":{"identifier":"deny-exists","description":"Denies the exists command without any pre-configured scope.","commands":{"allow":[],"deny":["exists"]}},"deny-fstat":{"identifier":"deny-fstat","description":"Denies the fstat command without any pre-configured scope.","commands":{"allow":[],"deny":["fstat"]}},"deny-ftruncate":{"identifier":"deny-ftruncate","description":"Denies the ftruncate command without any pre-configured scope.","commands":{"allow":[],"deny":["ftruncate"]}},"deny-lstat":{"identifier":"deny-lstat","description":"Denies the lstat command without any pre-configured scope.","commands":{"allow":[],"deny":["lstat"]}},"deny-mkdir":{"identifier":"deny-mkdir","description":"Denies the mkdir command without any pre-configured scope.","commands":{"allow":[],"deny":["mkdir"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-read":{"identifier":"deny-read","description":"Denies the read command without any pre-configured scope.","commands":{"allow":[],"deny":["read"]}},"deny-read-dir":{"identifier":"deny-read-dir","description":"Denies the read_dir command without any pre-configured scope.","commands":{"allow":[],"deny":["read_dir"]}},"deny-read-file":{"identifier":"deny-read-file","description":"Denies the read_file command without any pre-configured scope.","commands":{"allow":[],"deny":["read_file"]}},"deny-read-text-file":{"identifier":"deny-read-text-file","description":"Denies the read_text_file command without any pre-configured scope.","commands":{"allow":[],"deny":["read_text_file"]}},"deny-read-text-file-lines":{"identifier":"deny-read-text-file-lines","description":"Denies the read_text_file_lines command without any pre-configured scope.","commands":{"allow":[],"deny":["read_text_file_lines"]}},"deny-read-text-file-lines-next":{"identifier":"deny-read-text-file-lines-next","description":"Denies the read_text_file_lines_next command without any pre-configured scope.","commands":{"allow":[],"deny":["read_text_file_lines_next"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-rename":{"identifier":"deny-rename","description":"Denies the rename command without any pre-configured scope.","commands":{"allow":[],"deny":["rename"]}},"deny-seek":{"identifier":"deny-seek","description":"Denies the seek command without any pre-configured scope.","commands":{"allow":[],"deny":["seek"]}},"deny-stat":{"identifier":"deny-stat","description":"Denies the stat command without any pre-configured scope.","commands":{"allow":[],"deny":["stat"]}},"deny-truncate":{"identifier":"deny-truncate","description":"Denies the truncate command without any pre-configured scope.","commands":{"allow":[],"deny":["truncate"]}},"deny-unwatch":{"identifier":"deny-unwatch","description":"Denies the unwatch command without any pre-configured scope.","commands":{"allow":[],"deny":["unwatch"]}},"deny-watch":{"identifier":"deny-watch","description":"Denies the watch command without any pre-configured scope.","commands":{"allow":[],"deny":["watch"]}},"deny-webview-data-linux":{"identifier":"deny-webview-data-linux","description":"This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.","commands":{"allow":[],"deny":[]}},"deny-webview-data-windows":{"identifier":"deny-webview-data-windows","description":"This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.","commands":{"allow":[],"deny":[]}},"deny-write":{"identifier":"deny-write","description":"Denies the write command without any pre-configured scope.","commands":{"allow":[],"deny":["write"]}},"deny-write-file":{"identifier":"deny-write-file","description":"Denies the write_file command without any pre-configured scope.","commands":{"allow":[],"deny":["write_file"]}},"deny-write-text-file":{"identifier":"deny-write-text-file","description":"Denies the write_text_file command without any pre-configured scope.","commands":{"allow":[],"deny":["write_text_file"]}},"read-all":{"identifier":"read-all","description":"This enables all read related commands without any pre-configured accessible paths.","commands":{"allow":["read_dir","read_file","read","open","read_text_file","read_text_file_lines","read_text_file_lines_next","seek","stat","lstat","fstat","exists","watch","unwatch"],"deny":[]}},"read-app-specific-dirs-recursive":{"identifier":"read-app-specific-dirs-recursive","description":"This permission allows recursive read functionality on the application\nspecific base directories. \n","commands":{"allow":["read_dir","read_file","read_text_file","read_text_file_lines","read_text_file_lines_next","exists","scope-app-recursive"],"deny":[]}},"read-dirs":{"identifier":"read-dirs","description":"This enables directory read and file metadata related commands without any pre-configured accessible paths.","commands":{"allow":["read_dir","stat","lstat","fstat","exists"],"deny":[]}},"read-files":{"identifier":"read-files","description":"This enables file read related commands without any pre-configured accessible paths.","commands":{"allow":["read_file","read","open","read_text_file","read_text_file_lines","read_text_file_lines_next","seek","stat","lstat","fstat","exists"],"deny":[]}},"read-meta":{"identifier":"read-meta","description":"This enables all index or metadata related commands without any pre-configured accessible paths.","commands":{"allow":["read_dir","stat","lstat","fstat","exists"],"deny":[]}},"scope":{"identifier":"scope","description":"An empty permission you can use to modify the global scope.","commands":{"allow":[],"deny":[]}},"scope-app":{"identifier":"scope-app","description":"This scope permits access to all files and list content of top level directories in the application folders.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCONFIG"},{"path":"$APPCONFIG/*"},{"path":"$APPDATA"},{"path":"$APPDATA/*"},{"path":"$APPLOCALDATA"},{"path":"$APPLOCALDATA/*"},{"path":"$APPCACHE"},{"path":"$APPCACHE/*"},{"path":"$APPLOG"},{"path":"$APPLOG/*"}]}},"scope-app-index":{"identifier":"scope-app-index","description":"This scope permits to list all files and folders in the application directories.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCONFIG"},{"path":"$APPDATA"},{"path":"$APPLOCALDATA"},{"path":"$APPCACHE"},{"path":"$APPLOG"}]}},"scope-app-recursive":{"identifier":"scope-app-recursive","description":"This scope permits recursive access to the complete application folders, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCONFIG"},{"path":"$APPCONFIG/**"},{"path":"$APPDATA"},{"path":"$APPDATA/**"},{"path":"$APPLOCALDATA"},{"path":"$APPLOCALDATA/**"},{"path":"$APPCACHE"},{"path":"$APPCACHE/**"},{"path":"$APPLOG"},{"path":"$APPLOG/**"}]}},"scope-appcache":{"identifier":"scope-appcache","description":"This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCACHE"},{"path":"$APPCACHE/*"}]}},"scope-appcache-index":{"identifier":"scope-appcache-index","description":"This scope permits to list all files and folders in the `$APPCACHE`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCACHE"}]}},"scope-appcache-recursive":{"identifier":"scope-appcache-recursive","description":"This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCACHE"},{"path":"$APPCACHE/**"}]}},"scope-appconfig":{"identifier":"scope-appconfig","description":"This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCONFIG"},{"path":"$APPCONFIG/*"}]}},"scope-appconfig-index":{"identifier":"scope-appconfig-index","description":"This scope permits to list all files and folders in the `$APPCONFIG`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCONFIG"}]}},"scope-appconfig-recursive":{"identifier":"scope-appconfig-recursive","description":"This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPCONFIG"},{"path":"$APPCONFIG/**"}]}},"scope-appdata":{"identifier":"scope-appdata","description":"This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPDATA"},{"path":"$APPDATA/*"}]}},"scope-appdata-index":{"identifier":"scope-appdata-index","description":"This scope permits to list all files and folders in the `$APPDATA`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPDATA"}]}},"scope-appdata-recursive":{"identifier":"scope-appdata-recursive","description":"This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPDATA"},{"path":"$APPDATA/**"}]}},"scope-applocaldata":{"identifier":"scope-applocaldata","description":"This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPLOCALDATA"},{"path":"$APPLOCALDATA/*"}]}},"scope-applocaldata-index":{"identifier":"scope-applocaldata-index","description":"This scope permits to list all files and folders in the `$APPLOCALDATA`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPLOCALDATA"}]}},"scope-applocaldata-recursive":{"identifier":"scope-applocaldata-recursive","description":"This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPLOCALDATA"},{"path":"$APPLOCALDATA/**"}]}},"scope-applog":{"identifier":"scope-applog","description":"This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPLOG"},{"path":"$APPLOG/*"}]}},"scope-applog-index":{"identifier":"scope-applog-index","description":"This scope permits to list all files and folders in the `$APPLOG`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPLOG"}]}},"scope-applog-recursive":{"identifier":"scope-applog-recursive","description":"This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$APPLOG"},{"path":"$APPLOG/**"}]}},"scope-audio":{"identifier":"scope-audio","description":"This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$AUDIO"},{"path":"$AUDIO/*"}]}},"scope-audio-index":{"identifier":"scope-audio-index","description":"This scope permits to list all files and folders in the `$AUDIO`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$AUDIO"}]}},"scope-audio-recursive":{"identifier":"scope-audio-recursive","description":"This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$AUDIO"},{"path":"$AUDIO/**"}]}},"scope-cache":{"identifier":"scope-cache","description":"This scope permits access to all files and list content of top level directories in the `$CACHE` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$CACHE"},{"path":"$CACHE/*"}]}},"scope-cache-index":{"identifier":"scope-cache-index","description":"This scope permits to list all files and folders in the `$CACHE`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$CACHE"}]}},"scope-cache-recursive":{"identifier":"scope-cache-recursive","description":"This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$CACHE"},{"path":"$CACHE/**"}]}},"scope-config":{"identifier":"scope-config","description":"This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$CONFIG"},{"path":"$CONFIG/*"}]}},"scope-config-index":{"identifier":"scope-config-index","description":"This scope permits to list all files and folders in the `$CONFIG`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$CONFIG"}]}},"scope-config-recursive":{"identifier":"scope-config-recursive","description":"This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$CONFIG"},{"path":"$CONFIG/**"}]}},"scope-data":{"identifier":"scope-data","description":"This scope permits access to all files and list content of top level directories in the `$DATA` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DATA"},{"path":"$DATA/*"}]}},"scope-data-index":{"identifier":"scope-data-index","description":"This scope permits to list all files and folders in the `$DATA`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DATA"}]}},"scope-data-recursive":{"identifier":"scope-data-recursive","description":"This scope permits recursive access to the complete `$DATA` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DATA"},{"path":"$DATA/**"}]}},"scope-desktop":{"identifier":"scope-desktop","description":"This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DESKTOP"},{"path":"$DESKTOP/*"}]}},"scope-desktop-index":{"identifier":"scope-desktop-index","description":"This scope permits to list all files and folders in the `$DESKTOP`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DESKTOP"}]}},"scope-desktop-recursive":{"identifier":"scope-desktop-recursive","description":"This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DESKTOP"},{"path":"$DESKTOP/**"}]}},"scope-document":{"identifier":"scope-document","description":"This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DOCUMENT"},{"path":"$DOCUMENT/*"}]}},"scope-document-index":{"identifier":"scope-document-index","description":"This scope permits to list all files and folders in the `$DOCUMENT`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DOCUMENT"}]}},"scope-document-recursive":{"identifier":"scope-document-recursive","description":"This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DOCUMENT"},{"path":"$DOCUMENT/**"}]}},"scope-download":{"identifier":"scope-download","description":"This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DOWNLOAD"},{"path":"$DOWNLOAD/*"}]}},"scope-download-index":{"identifier":"scope-download-index","description":"This scope permits to list all files and folders in the `$DOWNLOAD`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DOWNLOAD"}]}},"scope-download-recursive":{"identifier":"scope-download-recursive","description":"This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$DOWNLOAD"},{"path":"$DOWNLOAD/**"}]}},"scope-exe":{"identifier":"scope-exe","description":"This scope permits access to all files and list content of top level directories in the `$EXE` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$EXE"},{"path":"$EXE/*"}]}},"scope-exe-index":{"identifier":"scope-exe-index","description":"This scope permits to list all files and folders in the `$EXE`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$EXE"}]}},"scope-exe-recursive":{"identifier":"scope-exe-recursive","description":"This scope permits recursive access to the complete `$EXE` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$EXE"},{"path":"$EXE/**"}]}},"scope-font":{"identifier":"scope-font","description":"This scope permits access to all files and list content of top level directories in the `$FONT` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$FONT"},{"path":"$FONT/*"}]}},"scope-font-index":{"identifier":"scope-font-index","description":"This scope permits to list all files and folders in the `$FONT`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$FONT"}]}},"scope-font-recursive":{"identifier":"scope-font-recursive","description":"This scope permits recursive access to the complete `$FONT` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$FONT"},{"path":"$FONT/**"}]}},"scope-home":{"identifier":"scope-home","description":"This scope permits access to all files and list content of top level directories in the `$HOME` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$HOME"},{"path":"$HOME/*"}]}},"scope-home-index":{"identifier":"scope-home-index","description":"This scope permits to list all files and folders in the `$HOME`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$HOME"}]}},"scope-home-recursive":{"identifier":"scope-home-recursive","description":"This scope permits recursive access to the complete `$HOME` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$HOME"},{"path":"$HOME/**"}]}},"scope-localdata":{"identifier":"scope-localdata","description":"This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$LOCALDATA"},{"path":"$LOCALDATA/*"}]}},"scope-localdata-index":{"identifier":"scope-localdata-index","description":"This scope permits to list all files and folders in the `$LOCALDATA`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$LOCALDATA"}]}},"scope-localdata-recursive":{"identifier":"scope-localdata-recursive","description":"This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$LOCALDATA"},{"path":"$LOCALDATA/**"}]}},"scope-log":{"identifier":"scope-log","description":"This scope permits access to all files and list content of top level directories in the `$LOG` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$LOG"},{"path":"$LOG/*"}]}},"scope-log-index":{"identifier":"scope-log-index","description":"This scope permits to list all files and folders in the `$LOG`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$LOG"}]}},"scope-log-recursive":{"identifier":"scope-log-recursive","description":"This scope permits recursive access to the complete `$LOG` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$LOG"},{"path":"$LOG/**"}]}},"scope-picture":{"identifier":"scope-picture","description":"This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$PICTURE"},{"path":"$PICTURE/*"}]}},"scope-picture-index":{"identifier":"scope-picture-index","description":"This scope permits to list all files and folders in the `$PICTURE`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$PICTURE"}]}},"scope-picture-recursive":{"identifier":"scope-picture-recursive","description":"This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$PICTURE"},{"path":"$PICTURE/**"}]}},"scope-public":{"identifier":"scope-public","description":"This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$PUBLIC"},{"path":"$PUBLIC/*"}]}},"scope-public-index":{"identifier":"scope-public-index","description":"This scope permits to list all files and folders in the `$PUBLIC`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$PUBLIC"}]}},"scope-public-recursive":{"identifier":"scope-public-recursive","description":"This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$PUBLIC"},{"path":"$PUBLIC/**"}]}},"scope-resource":{"identifier":"scope-resource","description":"This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$RESOURCE"},{"path":"$RESOURCE/*"}]}},"scope-resource-index":{"identifier":"scope-resource-index","description":"This scope permits to list all files and folders in the `$RESOURCE`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$RESOURCE"}]}},"scope-resource-recursive":{"identifier":"scope-resource-recursive","description":"This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$RESOURCE"},{"path":"$RESOURCE/**"}]}},"scope-runtime":{"identifier":"scope-runtime","description":"This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$RUNTIME"},{"path":"$RUNTIME/*"}]}},"scope-runtime-index":{"identifier":"scope-runtime-index","description":"This scope permits to list all files and folders in the `$RUNTIME`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$RUNTIME"}]}},"scope-runtime-recursive":{"identifier":"scope-runtime-recursive","description":"This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$RUNTIME"},{"path":"$RUNTIME/**"}]}},"scope-temp":{"identifier":"scope-temp","description":"This scope permits access to all files and list content of top level directories in the `$TEMP` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$TEMP"},{"path":"$TEMP/*"}]}},"scope-temp-index":{"identifier":"scope-temp-index","description":"This scope permits to list all files and folders in the `$TEMP`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$TEMP"}]}},"scope-temp-recursive":{"identifier":"scope-temp-recursive","description":"This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$TEMP"},{"path":"$TEMP/**"}]}},"scope-template":{"identifier":"scope-template","description":"This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$TEMPLATE"},{"path":"$TEMPLATE/*"}]}},"scope-template-index":{"identifier":"scope-template-index","description":"This scope permits to list all files and folders in the `$TEMPLATE`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$TEMPLATE"}]}},"scope-template-recursive":{"identifier":"scope-template-recursive","description":"This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$TEMPLATE"},{"path":"$TEMPLATE/**"}]}},"scope-video":{"identifier":"scope-video","description":"This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$VIDEO"},{"path":"$VIDEO/*"}]}},"scope-video-index":{"identifier":"scope-video-index","description":"This scope permits to list all files and folders in the `$VIDEO`folder.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$VIDEO"}]}},"scope-video-recursive":{"identifier":"scope-video-recursive","description":"This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"path":"$VIDEO"},{"path":"$VIDEO/**"}]}},"write-all":{"identifier":"write-all","description":"This enables all write related commands without any pre-configured accessible paths.","commands":{"allow":["mkdir","create","copy_file","remove","rename","truncate","ftruncate","write","write_file","write_text_file"],"deny":[]}},"write-files":{"identifier":"write-files","description":"This enables all file write related commands without any pre-configured accessible paths.","commands":{"allow":["create","copy_file","remove","rename","truncate","ftruncate","write","write_file","write_text_file"],"deny":[]}}},"permission_sets":{"allow-app-meta":{"identifier":"allow-app-meta","description":"This allows non-recursive read access to metadata of the application folders, including file listing and statistics.","permissions":["read-meta","scope-app-index"]},"allow-app-meta-recursive":{"identifier":"allow-app-meta-recursive","description":"This allows full recursive read access to metadata of the application folders, including file listing and statistics.","permissions":["read-meta","scope-app-recursive"]},"allow-app-read":{"identifier":"allow-app-read","description":"This allows non-recursive read access to the application folders.","permissions":["read-all","scope-app"]},"allow-app-read-recursive":{"identifier":"allow-app-read-recursive","description":"This allows full recursive read access to the complete application folders, files and subdirectories.","permissions":["read-all","scope-app-recursive"]},"allow-app-write":{"identifier":"allow-app-write","description":"This allows non-recursive write access to the application folders.","permissions":["write-all","scope-app"]},"allow-app-write-recursive":{"identifier":"allow-app-write-recursive","description":"This allows full recursive write access to the complete application folders, files and subdirectories.","permissions":["write-all","scope-app-recursive"]},"allow-appcache-meta":{"identifier":"allow-appcache-meta","description":"This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.","permissions":["read-meta","scope-appcache-index"]},"allow-appcache-meta-recursive":{"identifier":"allow-appcache-meta-recursive","description":"This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.","permissions":["read-meta","scope-appcache-recursive"]},"allow-appcache-read":{"identifier":"allow-appcache-read","description":"This allows non-recursive read access to the `$APPCACHE` folder.","permissions":["read-all","scope-appcache"]},"allow-appcache-read-recursive":{"identifier":"allow-appcache-read-recursive","description":"This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.","permissions":["read-all","scope-appcache-recursive"]},"allow-appcache-write":{"identifier":"allow-appcache-write","description":"This allows non-recursive write access to the `$APPCACHE` folder.","permissions":["write-all","scope-appcache"]},"allow-appcache-write-recursive":{"identifier":"allow-appcache-write-recursive","description":"This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.","permissions":["write-all","scope-appcache-recursive"]},"allow-appconfig-meta":{"identifier":"allow-appconfig-meta","description":"This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.","permissions":["read-meta","scope-appconfig-index"]},"allow-appconfig-meta-recursive":{"identifier":"allow-appconfig-meta-recursive","description":"This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.","permissions":["read-meta","scope-appconfig-recursive"]},"allow-appconfig-read":{"identifier":"allow-appconfig-read","description":"This allows non-recursive read access to the `$APPCONFIG` folder.","permissions":["read-all","scope-appconfig"]},"allow-appconfig-read-recursive":{"identifier":"allow-appconfig-read-recursive","description":"This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.","permissions":["read-all","scope-appconfig-recursive"]},"allow-appconfig-write":{"identifier":"allow-appconfig-write","description":"This allows non-recursive write access to the `$APPCONFIG` folder.","permissions":["write-all","scope-appconfig"]},"allow-appconfig-write-recursive":{"identifier":"allow-appconfig-write-recursive","description":"This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.","permissions":["write-all","scope-appconfig-recursive"]},"allow-appdata-meta":{"identifier":"allow-appdata-meta","description":"This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.","permissions":["read-meta","scope-appdata-index"]},"allow-appdata-meta-recursive":{"identifier":"allow-appdata-meta-recursive","description":"This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.","permissions":["read-meta","scope-appdata-recursive"]},"allow-appdata-read":{"identifier":"allow-appdata-read","description":"This allows non-recursive read access to the `$APPDATA` folder.","permissions":["read-all","scope-appdata"]},"allow-appdata-read-recursive":{"identifier":"allow-appdata-read-recursive","description":"This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.","permissions":["read-all","scope-appdata-recursive"]},"allow-appdata-write":{"identifier":"allow-appdata-write","description":"This allows non-recursive write access to the `$APPDATA` folder.","permissions":["write-all","scope-appdata"]},"allow-appdata-write-recursive":{"identifier":"allow-appdata-write-recursive","description":"This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.","permissions":["write-all","scope-appdata-recursive"]},"allow-applocaldata-meta":{"identifier":"allow-applocaldata-meta","description":"This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.","permissions":["read-meta","scope-applocaldata-index"]},"allow-applocaldata-meta-recursive":{"identifier":"allow-applocaldata-meta-recursive","description":"This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.","permissions":["read-meta","scope-applocaldata-recursive"]},"allow-applocaldata-read":{"identifier":"allow-applocaldata-read","description":"This allows non-recursive read access to the `$APPLOCALDATA` folder.","permissions":["read-all","scope-applocaldata"]},"allow-applocaldata-read-recursive":{"identifier":"allow-applocaldata-read-recursive","description":"This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.","permissions":["read-all","scope-applocaldata-recursive"]},"allow-applocaldata-write":{"identifier":"allow-applocaldata-write","description":"This allows non-recursive write access to the `$APPLOCALDATA` folder.","permissions":["write-all","scope-applocaldata"]},"allow-applocaldata-write-recursive":{"identifier":"allow-applocaldata-write-recursive","description":"This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.","permissions":["write-all","scope-applocaldata-recursive"]},"allow-applog-meta":{"identifier":"allow-applog-meta","description":"This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.","permissions":["read-meta","scope-applog-index"]},"allow-applog-meta-recursive":{"identifier":"allow-applog-meta-recursive","description":"This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.","permissions":["read-meta","scope-applog-recursive"]},"allow-applog-read":{"identifier":"allow-applog-read","description":"This allows non-recursive read access to the `$APPLOG` folder.","permissions":["read-all","scope-applog"]},"allow-applog-read-recursive":{"identifier":"allow-applog-read-recursive","description":"This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.","permissions":["read-all","scope-applog-recursive"]},"allow-applog-write":{"identifier":"allow-applog-write","description":"This allows non-recursive write access to the `$APPLOG` folder.","permissions":["write-all","scope-applog"]},"allow-applog-write-recursive":{"identifier":"allow-applog-write-recursive","description":"This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.","permissions":["write-all","scope-applog-recursive"]},"allow-audio-meta":{"identifier":"allow-audio-meta","description":"This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.","permissions":["read-meta","scope-audio-index"]},"allow-audio-meta-recursive":{"identifier":"allow-audio-meta-recursive","description":"This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.","permissions":["read-meta","scope-audio-recursive"]},"allow-audio-read":{"identifier":"allow-audio-read","description":"This allows non-recursive read access to the `$AUDIO` folder.","permissions":["read-all","scope-audio"]},"allow-audio-read-recursive":{"identifier":"allow-audio-read-recursive","description":"This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.","permissions":["read-all","scope-audio-recursive"]},"allow-audio-write":{"identifier":"allow-audio-write","description":"This allows non-recursive write access to the `$AUDIO` folder.","permissions":["write-all","scope-audio"]},"allow-audio-write-recursive":{"identifier":"allow-audio-write-recursive","description":"This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.","permissions":["write-all","scope-audio-recursive"]},"allow-cache-meta":{"identifier":"allow-cache-meta","description":"This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.","permissions":["read-meta","scope-cache-index"]},"allow-cache-meta-recursive":{"identifier":"allow-cache-meta-recursive","description":"This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.","permissions":["read-meta","scope-cache-recursive"]},"allow-cache-read":{"identifier":"allow-cache-read","description":"This allows non-recursive read access to the `$CACHE` folder.","permissions":["read-all","scope-cache"]},"allow-cache-read-recursive":{"identifier":"allow-cache-read-recursive","description":"This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.","permissions":["read-all","scope-cache-recursive"]},"allow-cache-write":{"identifier":"allow-cache-write","description":"This allows non-recursive write access to the `$CACHE` folder.","permissions":["write-all","scope-cache"]},"allow-cache-write-recursive":{"identifier":"allow-cache-write-recursive","description":"This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.","permissions":["write-all","scope-cache-recursive"]},"allow-config-meta":{"identifier":"allow-config-meta","description":"This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.","permissions":["read-meta","scope-config-index"]},"allow-config-meta-recursive":{"identifier":"allow-config-meta-recursive","description":"This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.","permissions":["read-meta","scope-config-recursive"]},"allow-config-read":{"identifier":"allow-config-read","description":"This allows non-recursive read access to the `$CONFIG` folder.","permissions":["read-all","scope-config"]},"allow-config-read-recursive":{"identifier":"allow-config-read-recursive","description":"This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.","permissions":["read-all","scope-config-recursive"]},"allow-config-write":{"identifier":"allow-config-write","description":"This allows non-recursive write access to the `$CONFIG` folder.","permissions":["write-all","scope-config"]},"allow-config-write-recursive":{"identifier":"allow-config-write-recursive","description":"This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.","permissions":["write-all","scope-config-recursive"]},"allow-data-meta":{"identifier":"allow-data-meta","description":"This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.","permissions":["read-meta","scope-data-index"]},"allow-data-meta-recursive":{"identifier":"allow-data-meta-recursive","description":"This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.","permissions":["read-meta","scope-data-recursive"]},"allow-data-read":{"identifier":"allow-data-read","description":"This allows non-recursive read access to the `$DATA` folder.","permissions":["read-all","scope-data"]},"allow-data-read-recursive":{"identifier":"allow-data-read-recursive","description":"This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.","permissions":["read-all","scope-data-recursive"]},"allow-data-write":{"identifier":"allow-data-write","description":"This allows non-recursive write access to the `$DATA` folder.","permissions":["write-all","scope-data"]},"allow-data-write-recursive":{"identifier":"allow-data-write-recursive","description":"This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.","permissions":["write-all","scope-data-recursive"]},"allow-desktop-meta":{"identifier":"allow-desktop-meta","description":"This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.","permissions":["read-meta","scope-desktop-index"]},"allow-desktop-meta-recursive":{"identifier":"allow-desktop-meta-recursive","description":"This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.","permissions":["read-meta","scope-desktop-recursive"]},"allow-desktop-read":{"identifier":"allow-desktop-read","description":"This allows non-recursive read access to the `$DESKTOP` folder.","permissions":["read-all","scope-desktop"]},"allow-desktop-read-recursive":{"identifier":"allow-desktop-read-recursive","description":"This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.","permissions":["read-all","scope-desktop-recursive"]},"allow-desktop-write":{"identifier":"allow-desktop-write","description":"This allows non-recursive write access to the `$DESKTOP` folder.","permissions":["write-all","scope-desktop"]},"allow-desktop-write-recursive":{"identifier":"allow-desktop-write-recursive","description":"This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.","permissions":["write-all","scope-desktop-recursive"]},"allow-document-meta":{"identifier":"allow-document-meta","description":"This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.","permissions":["read-meta","scope-document-index"]},"allow-document-meta-recursive":{"identifier":"allow-document-meta-recursive","description":"This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.","permissions":["read-meta","scope-document-recursive"]},"allow-document-read":{"identifier":"allow-document-read","description":"This allows non-recursive read access to the `$DOCUMENT` folder.","permissions":["read-all","scope-document"]},"allow-document-read-recursive":{"identifier":"allow-document-read-recursive","description":"This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.","permissions":["read-all","scope-document-recursive"]},"allow-document-write":{"identifier":"allow-document-write","description":"This allows non-recursive write access to the `$DOCUMENT` folder.","permissions":["write-all","scope-document"]},"allow-document-write-recursive":{"identifier":"allow-document-write-recursive","description":"This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.","permissions":["write-all","scope-document-recursive"]},"allow-download-meta":{"identifier":"allow-download-meta","description":"This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.","permissions":["read-meta","scope-download-index"]},"allow-download-meta-recursive":{"identifier":"allow-download-meta-recursive","description":"This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.","permissions":["read-meta","scope-download-recursive"]},"allow-download-read":{"identifier":"allow-download-read","description":"This allows non-recursive read access to the `$DOWNLOAD` folder.","permissions":["read-all","scope-download"]},"allow-download-read-recursive":{"identifier":"allow-download-read-recursive","description":"This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.","permissions":["read-all","scope-download-recursive"]},"allow-download-write":{"identifier":"allow-download-write","description":"This allows non-recursive write access to the `$DOWNLOAD` folder.","permissions":["write-all","scope-download"]},"allow-download-write-recursive":{"identifier":"allow-download-write-recursive","description":"This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.","permissions":["write-all","scope-download-recursive"]},"allow-exe-meta":{"identifier":"allow-exe-meta","description":"This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.","permissions":["read-meta","scope-exe-index"]},"allow-exe-meta-recursive":{"identifier":"allow-exe-meta-recursive","description":"This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.","permissions":["read-meta","scope-exe-recursive"]},"allow-exe-read":{"identifier":"allow-exe-read","description":"This allows non-recursive read access to the `$EXE` folder.","permissions":["read-all","scope-exe"]},"allow-exe-read-recursive":{"identifier":"allow-exe-read-recursive","description":"This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.","permissions":["read-all","scope-exe-recursive"]},"allow-exe-write":{"identifier":"allow-exe-write","description":"This allows non-recursive write access to the `$EXE` folder.","permissions":["write-all","scope-exe"]},"allow-exe-write-recursive":{"identifier":"allow-exe-write-recursive","description":"This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.","permissions":["write-all","scope-exe-recursive"]},"allow-font-meta":{"identifier":"allow-font-meta","description":"This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.","permissions":["read-meta","scope-font-index"]},"allow-font-meta-recursive":{"identifier":"allow-font-meta-recursive","description":"This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.","permissions":["read-meta","scope-font-recursive"]},"allow-font-read":{"identifier":"allow-font-read","description":"This allows non-recursive read access to the `$FONT` folder.","permissions":["read-all","scope-font"]},"allow-font-read-recursive":{"identifier":"allow-font-read-recursive","description":"This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.","permissions":["read-all","scope-font-recursive"]},"allow-font-write":{"identifier":"allow-font-write","description":"This allows non-recursive write access to the `$FONT` folder.","permissions":["write-all","scope-font"]},"allow-font-write-recursive":{"identifier":"allow-font-write-recursive","description":"This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.","permissions":["write-all","scope-font-recursive"]},"allow-home-meta":{"identifier":"allow-home-meta","description":"This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.","permissions":["read-meta","scope-home-index"]},"allow-home-meta-recursive":{"identifier":"allow-home-meta-recursive","description":"This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.","permissions":["read-meta","scope-home-recursive"]},"allow-home-read":{"identifier":"allow-home-read","description":"This allows non-recursive read access to the `$HOME` folder.","permissions":["read-all","scope-home"]},"allow-home-read-recursive":{"identifier":"allow-home-read-recursive","description":"This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.","permissions":["read-all","scope-home-recursive"]},"allow-home-write":{"identifier":"allow-home-write","description":"This allows non-recursive write access to the `$HOME` folder.","permissions":["write-all","scope-home"]},"allow-home-write-recursive":{"identifier":"allow-home-write-recursive","description":"This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.","permissions":["write-all","scope-home-recursive"]},"allow-localdata-meta":{"identifier":"allow-localdata-meta","description":"This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.","permissions":["read-meta","scope-localdata-index"]},"allow-localdata-meta-recursive":{"identifier":"allow-localdata-meta-recursive","description":"This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.","permissions":["read-meta","scope-localdata-recursive"]},"allow-localdata-read":{"identifier":"allow-localdata-read","description":"This allows non-recursive read access to the `$LOCALDATA` folder.","permissions":["read-all","scope-localdata"]},"allow-localdata-read-recursive":{"identifier":"allow-localdata-read-recursive","description":"This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.","permissions":["read-all","scope-localdata-recursive"]},"allow-localdata-write":{"identifier":"allow-localdata-write","description":"This allows non-recursive write access to the `$LOCALDATA` folder.","permissions":["write-all","scope-localdata"]},"allow-localdata-write-recursive":{"identifier":"allow-localdata-write-recursive","description":"This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.","permissions":["write-all","scope-localdata-recursive"]},"allow-log-meta":{"identifier":"allow-log-meta","description":"This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.","permissions":["read-meta","scope-log-index"]},"allow-log-meta-recursive":{"identifier":"allow-log-meta-recursive","description":"This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.","permissions":["read-meta","scope-log-recursive"]},"allow-log-read":{"identifier":"allow-log-read","description":"This allows non-recursive read access to the `$LOG` folder.","permissions":["read-all","scope-log"]},"allow-log-read-recursive":{"identifier":"allow-log-read-recursive","description":"This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.","permissions":["read-all","scope-log-recursive"]},"allow-log-write":{"identifier":"allow-log-write","description":"This allows non-recursive write access to the `$LOG` folder.","permissions":["write-all","scope-log"]},"allow-log-write-recursive":{"identifier":"allow-log-write-recursive","description":"This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.","permissions":["write-all","scope-log-recursive"]},"allow-picture-meta":{"identifier":"allow-picture-meta","description":"This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.","permissions":["read-meta","scope-picture-index"]},"allow-picture-meta-recursive":{"identifier":"allow-picture-meta-recursive","description":"This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.","permissions":["read-meta","scope-picture-recursive"]},"allow-picture-read":{"identifier":"allow-picture-read","description":"This allows non-recursive read access to the `$PICTURE` folder.","permissions":["read-all","scope-picture"]},"allow-picture-read-recursive":{"identifier":"allow-picture-read-recursive","description":"This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.","permissions":["read-all","scope-picture-recursive"]},"allow-picture-write":{"identifier":"allow-picture-write","description":"This allows non-recursive write access to the `$PICTURE` folder.","permissions":["write-all","scope-picture"]},"allow-picture-write-recursive":{"identifier":"allow-picture-write-recursive","description":"This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.","permissions":["write-all","scope-picture-recursive"]},"allow-public-meta":{"identifier":"allow-public-meta","description":"This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.","permissions":["read-meta","scope-public-index"]},"allow-public-meta-recursive":{"identifier":"allow-public-meta-recursive","description":"This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.","permissions":["read-meta","scope-public-recursive"]},"allow-public-read":{"identifier":"allow-public-read","description":"This allows non-recursive read access to the `$PUBLIC` folder.","permissions":["read-all","scope-public"]},"allow-public-read-recursive":{"identifier":"allow-public-read-recursive","description":"This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.","permissions":["read-all","scope-public-recursive"]},"allow-public-write":{"identifier":"allow-public-write","description":"This allows non-recursive write access to the `$PUBLIC` folder.","permissions":["write-all","scope-public"]},"allow-public-write-recursive":{"identifier":"allow-public-write-recursive","description":"This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.","permissions":["write-all","scope-public-recursive"]},"allow-resource-meta":{"identifier":"allow-resource-meta","description":"This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.","permissions":["read-meta","scope-resource-index"]},"allow-resource-meta-recursive":{"identifier":"allow-resource-meta-recursive","description":"This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.","permissions":["read-meta","scope-resource-recursive"]},"allow-resource-read":{"identifier":"allow-resource-read","description":"This allows non-recursive read access to the `$RESOURCE` folder.","permissions":["read-all","scope-resource"]},"allow-resource-read-recursive":{"identifier":"allow-resource-read-recursive","description":"This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.","permissions":["read-all","scope-resource-recursive"]},"allow-resource-write":{"identifier":"allow-resource-write","description":"This allows non-recursive write access to the `$RESOURCE` folder.","permissions":["write-all","scope-resource"]},"allow-resource-write-recursive":{"identifier":"allow-resource-write-recursive","description":"This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.","permissions":["write-all","scope-resource-recursive"]},"allow-runtime-meta":{"identifier":"allow-runtime-meta","description":"This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.","permissions":["read-meta","scope-runtime-index"]},"allow-runtime-meta-recursive":{"identifier":"allow-runtime-meta-recursive","description":"This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.","permissions":["read-meta","scope-runtime-recursive"]},"allow-runtime-read":{"identifier":"allow-runtime-read","description":"This allows non-recursive read access to the `$RUNTIME` folder.","permissions":["read-all","scope-runtime"]},"allow-runtime-read-recursive":{"identifier":"allow-runtime-read-recursive","description":"This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.","permissions":["read-all","scope-runtime-recursive"]},"allow-runtime-write":{"identifier":"allow-runtime-write","description":"This allows non-recursive write access to the `$RUNTIME` folder.","permissions":["write-all","scope-runtime"]},"allow-runtime-write-recursive":{"identifier":"allow-runtime-write-recursive","description":"This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.","permissions":["write-all","scope-runtime-recursive"]},"allow-temp-meta":{"identifier":"allow-temp-meta","description":"This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.","permissions":["read-meta","scope-temp-index"]},"allow-temp-meta-recursive":{"identifier":"allow-temp-meta-recursive","description":"This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.","permissions":["read-meta","scope-temp-recursive"]},"allow-temp-read":{"identifier":"allow-temp-read","description":"This allows non-recursive read access to the `$TEMP` folder.","permissions":["read-all","scope-temp"]},"allow-temp-read-recursive":{"identifier":"allow-temp-read-recursive","description":"This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.","permissions":["read-all","scope-temp-recursive"]},"allow-temp-write":{"identifier":"allow-temp-write","description":"This allows non-recursive write access to the `$TEMP` folder.","permissions":["write-all","scope-temp"]},"allow-temp-write-recursive":{"identifier":"allow-temp-write-recursive","description":"This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.","permissions":["write-all","scope-temp-recursive"]},"allow-template-meta":{"identifier":"allow-template-meta","description":"This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.","permissions":["read-meta","scope-template-index"]},"allow-template-meta-recursive":{"identifier":"allow-template-meta-recursive","description":"This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.","permissions":["read-meta","scope-template-recursive"]},"allow-template-read":{"identifier":"allow-template-read","description":"This allows non-recursive read access to the `$TEMPLATE` folder.","permissions":["read-all","scope-template"]},"allow-template-read-recursive":{"identifier":"allow-template-read-recursive","description":"This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.","permissions":["read-all","scope-template-recursive"]},"allow-template-write":{"identifier":"allow-template-write","description":"This allows non-recursive write access to the `$TEMPLATE` folder.","permissions":["write-all","scope-template"]},"allow-template-write-recursive":{"identifier":"allow-template-write-recursive","description":"This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.","permissions":["write-all","scope-template-recursive"]},"allow-video-meta":{"identifier":"allow-video-meta","description":"This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.","permissions":["read-meta","scope-video-index"]},"allow-video-meta-recursive":{"identifier":"allow-video-meta-recursive","description":"This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.","permissions":["read-meta","scope-video-recursive"]},"allow-video-read":{"identifier":"allow-video-read","description":"This allows non-recursive read access to the `$VIDEO` folder.","permissions":["read-all","scope-video"]},"allow-video-read-recursive":{"identifier":"allow-video-read-recursive","description":"This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.","permissions":["read-all","scope-video-recursive"]},"allow-video-write":{"identifier":"allow-video-write","description":"This allows non-recursive write access to the `$VIDEO` folder.","permissions":["write-all","scope-video"]},"allow-video-write-recursive":{"identifier":"allow-video-write-recursive","description":"This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.","permissions":["write-all","scope-video-recursive"]},"deny-default":{"identifier":"deny-default","description":"This denies access to dangerous Tauri relevant files and folders by default.","permissions":["deny-webview-data-linux","deny-webview-data-windows"]}},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"description":"FS scope path.","type":"string"},{"properties":{"path":{"description":"FS scope path.","type":"string"}},"required":["path"],"type":"object"}],"description":"FS scope entry.","title":"FsScopeEntry"}},"http":{"default_permission":{"identifier":"default","description":"This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n","permissions":["allow-fetch","allow-fetch-cancel","allow-fetch-read-body","allow-fetch-send"]},"permissions":{"allow-fetch":{"identifier":"allow-fetch","description":"Enables the fetch command without any pre-configured scope.","commands":{"allow":["fetch"],"deny":[]}},"allow-fetch-cancel":{"identifier":"allow-fetch-cancel","description":"Enables the fetch_cancel command without any pre-configured scope.","commands":{"allow":["fetch_cancel"],"deny":[]}},"allow-fetch-read-body":{"identifier":"allow-fetch-read-body","description":"Enables the fetch_read_body command without any pre-configured scope.","commands":{"allow":["fetch_read_body"],"deny":[]}},"allow-fetch-send":{"identifier":"allow-fetch-send","description":"Enables the fetch_send command without any pre-configured scope.","commands":{"allow":["fetch_send"],"deny":[]}},"deny-fetch":{"identifier":"deny-fetch","description":"Denies the fetch command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch"]}},"deny-fetch-cancel":{"identifier":"deny-fetch-cancel","description":"Denies the fetch_cancel command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_cancel"]}},"deny-fetch-read-body":{"identifier":"deny-fetch-read-body","description":"Denies the fetch_read_body command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_read_body"]}},"deny-fetch-send":{"identifier":"deny-fetch-send","description":"Denies the fetch_send command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_send"]}}},"permission_sets":{},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"description":"A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"","type":"string"},{"properties":{"url":{"description":"A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"","type":"string"}},"required":["url"],"type":"object"}],"description":"HTTP scope entry.","title":"HttpScopeEntry"}},"os":{"default_permission":{"identifier":"default","description":"This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n","permissions":["allow-arch","allow-exe-extension","allow-family","allow-locale","allow-os-type","allow-platform","allow-version"]},"permissions":{"allow-arch":{"identifier":"allow-arch","description":"Enables the arch command without any pre-configured scope.","commands":{"allow":["arch"],"deny":[]}},"allow-exe-extension":{"identifier":"allow-exe-extension","description":"Enables the exe_extension command without any pre-configured scope.","commands":{"allow":["exe_extension"],"deny":[]}},"allow-family":{"identifier":"allow-family","description":"Enables the family command without any pre-configured scope.","commands":{"allow":["family"],"deny":[]}},"allow-hostname":{"identifier":"allow-hostname","description":"Enables the hostname command without any pre-configured scope.","commands":{"allow":["hostname"],"deny":[]}},"allow-locale":{"identifier":"allow-locale","description":"Enables the locale command without any pre-configured scope.","commands":{"allow":["locale"],"deny":[]}},"allow-os-type":{"identifier":"allow-os-type","description":"Enables the os_type command without any pre-configured scope.","commands":{"allow":["os_type"],"deny":[]}},"allow-platform":{"identifier":"allow-platform","description":"Enables the platform command without any pre-configured scope.","commands":{"allow":["platform"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-arch":{"identifier":"deny-arch","description":"Denies the arch command without any pre-configured scope.","commands":{"allow":[],"deny":["arch"]}},"deny-exe-extension":{"identifier":"deny-exe-extension","description":"Denies the exe_extension command without any pre-configured scope.","commands":{"allow":[],"deny":["exe_extension"]}},"deny-family":{"identifier":"deny-family","description":"Denies the family command without any pre-configured scope.","commands":{"allow":[],"deny":["family"]}},"deny-hostname":{"identifier":"deny-hostname","description":"Denies the hostname command without any pre-configured scope.","commands":{"allow":[],"deny":["hostname"]}},"deny-locale":{"identifier":"deny-locale","description":"Denies the locale command without any pre-configured scope.","commands":{"allow":[],"deny":["locale"]}},"deny-os-type":{"identifier":"deny-os-type","description":"Denies the os_type command without any pre-configured scope.","commands":{"allow":[],"deny":["os_type"]}},"deny-platform":{"identifier":"deny-platform","description":"Denies the platform command without any pre-configured scope.","commands":{"allow":[],"deny":["platform"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"process":{"default_permission":{"identifier":"default","description":"This permission set configures which\nprocess feeatures are by default exposed.\n\n#### Granted Permissions\n\nThis enables to quit via `allow-exit` and restart via `allow-restart`\nthe application.\n","permissions":["allow-exit","allow-restart"]},"permissions":{"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-restart":{"identifier":"allow-restart","description":"Enables the restart command without any pre-configured scope.","commands":{"allow":["restart"],"deny":[]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-restart":{"identifier":"deny-restart","description":"Denies the restart command without any pre-configured scope.","commands":{"allow":[],"deny":["restart"]}}},"permission_sets":{},"global_scope_schema":null},"shell":{"default_permission":{"identifier":"default","description":"This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality without any specific\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n","permissions":["allow-open"]},"permissions":{"allow-execute":{"identifier":"allow-execute","description":"Enables the execute command without any pre-configured scope.","commands":{"allow":["execute"],"deny":[]}},"allow-kill":{"identifier":"allow-kill","description":"Enables the kill command without any pre-configured scope.","commands":{"allow":["kill"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-spawn":{"identifier":"allow-spawn","description":"Enables the spawn command without any pre-configured scope.","commands":{"allow":["spawn"],"deny":[]}},"allow-stdin-write":{"identifier":"allow-stdin-write","description":"Enables the stdin_write command without any pre-configured scope.","commands":{"allow":["stdin_write"],"deny":[]}},"deny-execute":{"identifier":"deny-execute","description":"Denies the execute command without any pre-configured scope.","commands":{"allow":[],"deny":["execute"]}},"deny-kill":{"identifier":"deny-kill","description":"Denies the kill command without any pre-configured scope.","commands":{"allow":[],"deny":["kill"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-spawn":{"identifier":"deny-spawn","description":"Denies the spawn command without any pre-configured scope.","commands":{"allow":[],"deny":["spawn"]}},"deny-stdin-write":{"identifier":"deny-stdin-write","description":"Denies the stdin_write command without any pre-configured scope.","commands":{"allow":[],"deny":["stdin_write"]}}},"permission_sets":{},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"additionalProperties":false,"properties":{"args":{"allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}],"description":"The allowed arguments for the command execution."},"cmd":{"description":"The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.","type":"string"},"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"}},"required":["cmd","name"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}],"description":"The allowed arguments for the command execution."},"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"},"sidecar":{"description":"If this command is a sidecar command.","type":"boolean"}},"required":["name","sidecar"],"type":"object"}],"definitions":{"ShellScopeEntryAllowedArg":{"anyOf":[{"description":"A non-configurable argument that is passed to the command in the order it was specified.","type":"string"},{"additionalProperties":false,"description":"A variable that is set while calling the command from the webview API.","properties":{"raw":{"default":false,"description":"Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.","type":"boolean"},"validator":{"description":"[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ","type":"string"}},"required":["validator"],"type":"object"}],"description":"A command argument allowed to be executed by the webview API."},"ShellScopeEntryAllowedArgs":{"anyOf":[{"description":"Use a simple boolean to allow all or disable all arguments to this command configuration.","type":"boolean"},{"description":"A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.","items":{"$ref":"#/definitions/ShellScopeEntryAllowedArg"},"type":"array"}],"description":"A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration."}},"description":"Shell scope entry.","title":"ShellScopeEntry"}},"updater":{"default_permission":{"identifier":"default","description":"This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n","permissions":["allow-check","allow-download","allow-install","allow-download-and-install"]},"permissions":{"allow-check":{"identifier":"allow-check","description":"Enables the check command without any pre-configured scope.","commands":{"allow":["check"],"deny":[]}},"allow-download":{"identifier":"allow-download","description":"Enables the download command without any pre-configured scope.","commands":{"allow":["download"],"deny":[]}},"allow-download-and-install":{"identifier":"allow-download-and-install","description":"Enables the download_and_install command without any pre-configured scope.","commands":{"allow":["download_and_install"],"deny":[]}},"allow-install":{"identifier":"allow-install","description":"Enables the install command without any pre-configured scope.","commands":{"allow":["install"],"deny":[]}},"deny-check":{"identifier":"deny-check","description":"Denies the check command without any pre-configured scope.","commands":{"allow":[],"deny":["check"]}},"deny-download":{"identifier":"deny-download","description":"Denies the download command without any pre-configured scope.","commands":{"allow":[],"deny":["download"]}},"deny-download-and-install":{"identifier":"deny-download-and-install","description":"Denies the download_and_install command without any pre-configured scope.","commands":{"allow":[],"deny":["download_and_install"]}},"deny-install":{"identifier":"deny-install","description":"Denies the install command without any pre-configured scope.","commands":{"allow":[],"deny":["install"]}}},"permission_sets":{},"global_scope_schema":null}} \ No newline at end of file diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json new file mode 100644 index 00000000..bac4c1ed --- /dev/null +++ b/src-tauri/gen/schemas/capabilities.json @@ -0,0 +1 @@ +{"desktop-capability":{"identifier":"desktop-capability","description":"","local":true,"permissions":["updater:default","process:default","shell:default","http:default","deep-link:default"],"platforms":["macOS","windows","linux"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:default","fs:allow-read-file","fs:allow-write-file","fs:allow-read-dir","fs:allow-copy-file","fs:allow-mkdir","fs:allow-remove","fs:allow-remove","fs:allow-rename","fs:allow-exists",{"identifier":"fs:scope","allow":["$APPDATA","$APPDATA/*","$APPDATA/**/*","$DOWNLOAD/*","/data/**/*","$RESOURCE/*"]},"core:window:allow-maximize","core:window:allow-set-fullscreen","shell:allow-open","dialog:allow-open","dialog:allow-save","dialog:allow-message","dialog:allow-ask","dialog:allow-confirm",{"identifier":"http:default","allow":[{"url":"https://*/*"},{"url":"https://*/**/*"},{"url":"http://*/*"},{"url":"http://*/**/*"}]},"os:allow-platform","os:allow-version","os:allow-os-type","os:allow-family","os:allow-arch","os:allow-exe-extension","os:allow-locale","os:allow-hostname","process:allow-restart","core:app:allow-app-show","core:app:allow-app-hide","fs:default","os:default","dialog:default","process:default","shell:default","http:default","deep-link:default"]}} \ No newline at end of file diff --git a/src-tauri/gen/schemas/desktop-schema.json b/src-tauri/gen/schemas/desktop-schema.json new file mode 100644 index 00000000..49c92a37 --- /dev/null +++ b/src-tauri/gen/schemas/desktop-schema.json @@ -0,0 +1,5403 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CapabilityFile", + "description": "Capability formats accepted in a capability file.", + "anyOf": [ + { + "description": "A single capability.", + "allOf": [ + { + "$ref": "#/definitions/Capability" + } + ] + }, + { + "description": "A list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + }, + { + "description": "A list of capabilities.", + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "description": "The list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + } + } + } + ], + "definitions": { + "Capability": { + "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```", + "type": "object", + "required": [ + "identifier", + "permissions" + ], + "properties": { + "identifier": { + "description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`", + "type": "string" + }, + "description": { + "description": "Description of what the capability is intended to allow on associated windows.\n\nIt should contain a description of what the grouped permissions should allow.\n\n## Example\n\nThis capability allows the `main` window access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.", + "default": "", + "type": "string" + }, + "remote": { + "description": "Configure remote URLs that can use the capability permissions.\n\nThis setting is optional and defaults to not being set, as our default use case is that the content is served from our local application.\n\n:::caution Make sure you understand the security implications of providing remote sources with local system access. :::\n\n## Example\n\n```json { \"urls\": [\"https://*.mydomain.dev\"] } ```", + "anyOf": [ + { + "$ref": "#/definitions/CapabilityRemote" + }, + { + "type": "null" + } + ] + }, + "local": { + "description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.", + "default": true, + "type": "boolean" + }, + "windows": { + "description": "List of windows that are affected by this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.\n\n## Example\n\n`[\"main\"]`", + "type": "array", + "items": { + "type": "string" + } + }, + "webviews": { + "description": "List of webviews that are affected by this capability. Can be a glob pattern.\n\nThis is only required when using on multiwebview contexts, by default all child webviews of a window that matches [`Self::windows`] are linked.\n\n## Example\n\n`[\"sub-webview-one\", \"sub-webview-two\"]`", + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```", + "type": "array", + "items": { + "$ref": "#/definitions/PermissionEntry" + }, + "uniqueItems": true + }, + "platforms": { + "description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Target" + } + } + } + }, + "CapabilityRemote": { + "description": "Configuration for remote URLs that are associated with the capability.", + "type": "object", + "required": [ + "urls" + ], + "properties": { + "urls": { + "description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PermissionEntry": { + "description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.", + "anyOf": [ + { + "description": "Reference a permission or permission set by identifier.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + }, + { + "description": "Reference a permission or permission set by identifier and extends its scope.", + "type": "object", + "allOf": [ + { + "if": { + "properties": { + "identifier": { + "anyOf": [ + { + "description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "const": "fs:default" + }, + { + "description": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta" + }, + { + "description": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the application folders.", + "type": "string", + "const": "fs:allow-app-read" + }, + { + "description": "This allows full recursive read access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-read-recursive" + }, + { + "description": "This allows non-recursive write access to the application folders.", + "type": "string", + "const": "fs:allow-app-write" + }, + { + "description": "This allows full recursive write access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-read" + }, + { + "description": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-write" + }, + { + "description": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-read" + }, + { + "description": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-write" + }, + { + "description": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-read" + }, + { + "description": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-write" + }, + { + "description": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-read" + }, + { + "description": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-write" + }, + { + "description": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-read" + }, + { + "description": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-write" + }, + { + "description": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-read" + }, + { + "description": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-write" + }, + { + "description": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-read" + }, + { + "description": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-write" + }, + { + "description": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-read" + }, + { + "description": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-write" + }, + { + "description": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-read" + }, + { + "description": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-write" + }, + { + "description": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-read" + }, + { + "description": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-write" + }, + { + "description": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-read" + }, + { + "description": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-write" + }, + { + "description": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-read" + }, + { + "description": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-write" + }, + { + "description": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-read" + }, + { + "description": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-write" + }, + { + "description": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-write-recursive" + }, + { + "description": "This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "const": "fs:deny-default" + }, + { + "description": "Enables the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-copy-file" + }, + { + "description": "Enables the create command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-create" + }, + { + "description": "Enables the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-exists" + }, + { + "description": "Enables the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-fstat" + }, + { + "description": "Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-ftruncate" + }, + { + "description": "Enables the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-lstat" + }, + { + "description": "Enables the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-mkdir" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-open" + }, + { + "description": "Enables the read command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read" + }, + { + "description": "Enables the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-dir" + }, + { + "description": "Enables the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-file" + }, + { + "description": "Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file" + }, + { + "description": "Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines" + }, + { + "description": "Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines-next" + }, + { + "description": "Enables the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-remove" + }, + { + "description": "Enables the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-rename" + }, + { + "description": "Enables the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-seek" + }, + { + "description": "Enables the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-stat" + }, + { + "description": "Enables the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-truncate" + }, + { + "description": "Enables the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-unwatch" + }, + { + "description": "Enables the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-watch" + }, + { + "description": "Enables the write command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write" + }, + { + "description": "Enables the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-file" + }, + { + "description": "Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-text-file" + }, + { + "description": "This permissions allows to create the application specific directories.\n", + "type": "string", + "const": "fs:create-app-specific-dirs" + }, + { + "description": "Denies the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-copy-file" + }, + { + "description": "Denies the create command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-create" + }, + { + "description": "Denies the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-exists" + }, + { + "description": "Denies the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-fstat" + }, + { + "description": "Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-ftruncate" + }, + { + "description": "Denies the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-lstat" + }, + { + "description": "Denies the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-mkdir" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-open" + }, + { + "description": "Denies the read command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read" + }, + { + "description": "Denies the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-dir" + }, + { + "description": "Denies the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-file" + }, + { + "description": "Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file" + }, + { + "description": "Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines" + }, + { + "description": "Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines-next" + }, + { + "description": "Denies the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-remove" + }, + { + "description": "Denies the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-rename" + }, + { + "description": "Denies the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-seek" + }, + { + "description": "Denies the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-stat" + }, + { + "description": "Denies the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-truncate" + }, + { + "description": "Denies the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-unwatch" + }, + { + "description": "Denies the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-watch" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-linux" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-windows" + }, + { + "description": "Denies the write command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write" + }, + { + "description": "Denies the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-file" + }, + { + "description": "Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-text-file" + }, + { + "description": "This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-all" + }, + { + "description": "This permission allows recursive read functionality on the application\nspecific base directories. \n", + "type": "string", + "const": "fs:read-app-specific-dirs-recursive" + }, + { + "description": "This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-dirs" + }, + { + "description": "This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-files" + }, + { + "description": "This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-meta" + }, + { + "description": "An empty permission you can use to modify the global scope.", + "type": "string", + "const": "fs:scope" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the application folders.", + "type": "string", + "const": "fs:scope-app" + }, + { + "description": "This scope permits to list all files and folders in the application directories.", + "type": "string", + "const": "fs:scope-app-index" + }, + { + "description": "This scope permits recursive access to the complete application folders, including sub directories and files.", + "type": "string", + "const": "fs:scope-app-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", + "type": "string", + "const": "fs:scope-appcache" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "const": "fs:scope-appcache-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appcache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:scope-appconfig" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "const": "fs:scope-appconfig-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appconfig-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", + "type": "string", + "const": "fs:scope-appdata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "const": "fs:scope-appdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:scope-applocaldata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "const": "fs:scope-applocaldata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applocaldata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", + "type": "string", + "const": "fs:scope-applog" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "const": "fs:scope-applog-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applog-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", + "type": "string", + "const": "fs:scope-audio" + }, + { + "description": "This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "const": "fs:scope-audio-index" + }, + { + "description": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-audio-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", + "type": "string", + "const": "fs:scope-cache" + }, + { + "description": "This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "const": "fs:scope-cache-index" + }, + { + "description": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-cache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", + "type": "string", + "const": "fs:scope-config" + }, + { + "description": "This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "const": "fs:scope-config-index" + }, + { + "description": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-config-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DATA` folder.", + "type": "string", + "const": "fs:scope-data" + }, + { + "description": "This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "const": "fs:scope-data-index" + }, + { + "description": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-data-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", + "type": "string", + "const": "fs:scope-desktop" + }, + { + "description": "This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "const": "fs:scope-desktop-index" + }, + { + "description": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-desktop-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:scope-document" + }, + { + "description": "This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "const": "fs:scope-document-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-document-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:scope-download" + }, + { + "description": "This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "const": "fs:scope-download-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-download-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$EXE` folder.", + "type": "string", + "const": "fs:scope-exe" + }, + { + "description": "This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "const": "fs:scope-exe-index" + }, + { + "description": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-exe-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$FONT` folder.", + "type": "string", + "const": "fs:scope-font" + }, + { + "description": "This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "const": "fs:scope-font-index" + }, + { + "description": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-font-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$HOME` folder.", + "type": "string", + "const": "fs:scope-home" + }, + { + "description": "This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "const": "fs:scope-home-index" + }, + { + "description": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-home-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:scope-localdata" + }, + { + "description": "This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "const": "fs:scope-localdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-localdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOG` folder.", + "type": "string", + "const": "fs:scope-log" + }, + { + "description": "This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "const": "fs:scope-log-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-log-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", + "type": "string", + "const": "fs:scope-picture" + }, + { + "description": "This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "const": "fs:scope-picture-index" + }, + { + "description": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-picture-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", + "type": "string", + "const": "fs:scope-public" + }, + { + "description": "This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "const": "fs:scope-public-index" + }, + { + "description": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-public-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", + "type": "string", + "const": "fs:scope-resource" + }, + { + "description": "This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "const": "fs:scope-resource-index" + }, + { + "description": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-resource-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", + "type": "string", + "const": "fs:scope-runtime" + }, + { + "description": "This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "const": "fs:scope-runtime-index" + }, + { + "description": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-runtime-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", + "type": "string", + "const": "fs:scope-temp" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "const": "fs:scope-temp-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-temp-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:scope-template" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "const": "fs:scope-template-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-template-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", + "type": "string", + "const": "fs:scope-video" + }, + { + "description": "This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "const": "fs:scope-video-index" + }, + { + "description": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-video-recursive" + }, + { + "description": "This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-all" + }, + { + "description": "This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-files" + } + ] + } + } + }, + "then": { + "properties": { + "allow": { + "items": { + "title": "FsScopeEntry", + "description": "FS scope entry.", + "anyOf": [ + { + "description": "FS scope path.", + "type": "string" + }, + { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "FS scope path.", + "type": "string" + } + } + } + ] + } + }, + "deny": { + "items": { + "title": "FsScopeEntry", + "description": "FS scope entry.", + "anyOf": [ + { + "description": "FS scope path.", + "type": "string" + }, + { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "FS scope path.", + "type": "string" + } + } + } + ] + } + } + } + }, + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + } + } + }, + { + "if": { + "properties": { + "identifier": { + "anyOf": [ + { + "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n", + "type": "string", + "const": "http:default" + }, + { + "description": "Enables the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch" + }, + { + "description": "Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-cancel" + }, + { + "description": "Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-read-body" + }, + { + "description": "Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-send" + }, + { + "description": "Denies the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch" + }, + { + "description": "Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-cancel" + }, + { + "description": "Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-read-body" + }, + { + "description": "Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-send" + } + ] + } + } + }, + "then": { + "properties": { + "allow": { + "items": { + "title": "HttpScopeEntry", + "description": "HTTP scope entry.", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } + } + ] + } + }, + "deny": { + "items": { + "title": "HttpScopeEntry", + "description": "HTTP scope entry.", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } + } + ] + } + } + } + }, + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + } + } + }, + { + "if": { + "properties": { + "identifier": { + "anyOf": [ + { + "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality without any specific\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n", + "type": "string", + "const": "shell:default" + }, + { + "description": "Enables the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-execute" + }, + { + "description": "Enables the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-kill" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-open" + }, + { + "description": "Enables the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-spawn" + }, + { + "description": "Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-stdin-write" + }, + { + "description": "Denies the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-execute" + }, + { + "description": "Denies the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-kill" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-open" + }, + { + "description": "Denies the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-spawn" + }, + { + "description": "Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-stdin-write" + } + ] + } + } + }, + "then": { + "properties": { + "allow": { + "items": { + "title": "ShellScopeEntry", + "description": "Shell scope entry.", + "anyOf": [ + { + "type": "object", + "required": [ + "cmd", + "name" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "additionalProperties": false + } + ] + } + }, + "deny": { + "items": { + "title": "ShellScopeEntry", + "description": "Shell scope entry.", + "anyOf": [ + { + "type": "object", + "required": [ + "cmd", + "name" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "additionalProperties": false + } + ] + } + } + } + }, + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + } + } + }, + { + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + }, + "allow": { + "description": "Data that defines what is allowed by the scope.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Value" + } + }, + "deny": { + "description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Value" + } + } + } + } + ], + "required": [ + "identifier" + ] + } + ] + }, + "Identifier": { + "description": "Permission identifier", + "oneOf": [ + { + "description": "Default core plugins set which includes:\n- 'core:path:default'\n- 'core:event:default'\n- 'core:window:default'\n- 'core:webview:default'\n- 'core:app:default'\n- 'core:image:default'\n- 'core:resources:default'\n- 'core:menu:default'\n- 'core:tray:default'\n", + "type": "string", + "const": "core:default" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:app:default" + }, + { + "description": "Enables the app_hide command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-app-hide" + }, + { + "description": "Enables the app_show command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-app-show" + }, + { + "description": "Enables the default_window_icon command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-default-window-icon" + }, + { + "description": "Enables the name command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-name" + }, + { + "description": "Enables the set_app_theme command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-set-app-theme" + }, + { + "description": "Enables the tauri_version command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-tauri-version" + }, + { + "description": "Enables the version command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-version" + }, + { + "description": "Denies the app_hide command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-app-hide" + }, + { + "description": "Denies the app_show command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-app-show" + }, + { + "description": "Denies the default_window_icon command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-default-window-icon" + }, + { + "description": "Denies the name command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-name" + }, + { + "description": "Denies the set_app_theme command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-set-app-theme" + }, + { + "description": "Denies the tauri_version command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-tauri-version" + }, + { + "description": "Denies the version command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-version" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:event:default" + }, + { + "description": "Enables the emit command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-emit" + }, + { + "description": "Enables the emit_to command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-emit-to" + }, + { + "description": "Enables the listen command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-listen" + }, + { + "description": "Enables the unlisten command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-unlisten" + }, + { + "description": "Denies the emit command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-emit" + }, + { + "description": "Denies the emit_to command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-emit-to" + }, + { + "description": "Denies the listen command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-listen" + }, + { + "description": "Denies the unlisten command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-unlisten" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:image:default" + }, + { + "description": "Enables the from_bytes command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-from-bytes" + }, + { + "description": "Enables the from_path command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-from-path" + }, + { + "description": "Enables the new command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-new" + }, + { + "description": "Enables the rgba command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-rgba" + }, + { + "description": "Enables the size command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-size" + }, + { + "description": "Denies the from_bytes command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-from-bytes" + }, + { + "description": "Denies the from_path command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-from-path" + }, + { + "description": "Denies the new command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-new" + }, + { + "description": "Denies the rgba command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-rgba" + }, + { + "description": "Denies the size command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-size" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:menu:default" + }, + { + "description": "Enables the append command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-append" + }, + { + "description": "Enables the create_default command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-create-default" + }, + { + "description": "Enables the get command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-get" + }, + { + "description": "Enables the insert command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-insert" + }, + { + "description": "Enables the is_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-is-checked" + }, + { + "description": "Enables the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-is-enabled" + }, + { + "description": "Enables the items command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-items" + }, + { + "description": "Enables the new command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-new" + }, + { + "description": "Enables the popup command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-popup" + }, + { + "description": "Enables the prepend command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-prepend" + }, + { + "description": "Enables the remove command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-remove" + }, + { + "description": "Enables the remove_at command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-remove-at" + }, + { + "description": "Enables the set_accelerator command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-accelerator" + }, + { + "description": "Enables the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-app-menu" + }, + { + "description": "Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-help-menu-for-nsapp" + }, + { + "description": "Enables the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-window-menu" + }, + { + "description": "Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-windows-menu-for-nsapp" + }, + { + "description": "Enables the set_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-checked" + }, + { + "description": "Enables the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-enabled" + }, + { + "description": "Enables the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-icon" + }, + { + "description": "Enables the set_text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-text" + }, + { + "description": "Enables the text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-text" + }, + { + "description": "Denies the append command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-append" + }, + { + "description": "Denies the create_default command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-create-default" + }, + { + "description": "Denies the get command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-get" + }, + { + "description": "Denies the insert command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-insert" + }, + { + "description": "Denies the is_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-is-checked" + }, + { + "description": "Denies the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-is-enabled" + }, + { + "description": "Denies the items command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-items" + }, + { + "description": "Denies the new command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-new" + }, + { + "description": "Denies the popup command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-popup" + }, + { + "description": "Denies the prepend command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-prepend" + }, + { + "description": "Denies the remove command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-remove" + }, + { + "description": "Denies the remove_at command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-remove-at" + }, + { + "description": "Denies the set_accelerator command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-accelerator" + }, + { + "description": "Denies the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-app-menu" + }, + { + "description": "Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-help-menu-for-nsapp" + }, + { + "description": "Denies the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-window-menu" + }, + { + "description": "Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-windows-menu-for-nsapp" + }, + { + "description": "Denies the set_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-checked" + }, + { + "description": "Denies the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-enabled" + }, + { + "description": "Denies the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-icon" + }, + { + "description": "Denies the set_text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-text" + }, + { + "description": "Denies the text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-text" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:path:default" + }, + { + "description": "Enables the basename command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-basename" + }, + { + "description": "Enables the dirname command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-dirname" + }, + { + "description": "Enables the extname command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-extname" + }, + { + "description": "Enables the is_absolute command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-is-absolute" + }, + { + "description": "Enables the join command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-join" + }, + { + "description": "Enables the normalize command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-normalize" + }, + { + "description": "Enables the resolve command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-resolve" + }, + { + "description": "Enables the resolve_directory command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-resolve-directory" + }, + { + "description": "Denies the basename command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-basename" + }, + { + "description": "Denies the dirname command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-dirname" + }, + { + "description": "Denies the extname command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-extname" + }, + { + "description": "Denies the is_absolute command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-is-absolute" + }, + { + "description": "Denies the join command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-join" + }, + { + "description": "Denies the normalize command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-normalize" + }, + { + "description": "Denies the resolve command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-resolve" + }, + { + "description": "Denies the resolve_directory command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-resolve-directory" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:resources:default" + }, + { + "description": "Enables the close command without any pre-configured scope.", + "type": "string", + "const": "core:resources:allow-close" + }, + { + "description": "Denies the close command without any pre-configured scope.", + "type": "string", + "const": "core:resources:deny-close" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:tray:default" + }, + { + "description": "Enables the get_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-get-by-id" + }, + { + "description": "Enables the new command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-new" + }, + { + "description": "Enables the remove_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-remove-by-id" + }, + { + "description": "Enables the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-icon" + }, + { + "description": "Enables the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-icon-as-template" + }, + { + "description": "Enables the set_menu command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-menu" + }, + { + "description": "Enables the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-show-menu-on-left-click" + }, + { + "description": "Enables the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-temp-dir-path" + }, + { + "description": "Enables the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-title" + }, + { + "description": "Enables the set_tooltip command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-tooltip" + }, + { + "description": "Enables the set_visible command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-visible" + }, + { + "description": "Denies the get_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-get-by-id" + }, + { + "description": "Denies the new command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-new" + }, + { + "description": "Denies the remove_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-remove-by-id" + }, + { + "description": "Denies the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-icon" + }, + { + "description": "Denies the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-icon-as-template" + }, + { + "description": "Denies the set_menu command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-menu" + }, + { + "description": "Denies the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-show-menu-on-left-click" + }, + { + "description": "Denies the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-temp-dir-path" + }, + { + "description": "Denies the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-title" + }, + { + "description": "Denies the set_tooltip command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-tooltip" + }, + { + "description": "Denies the set_visible command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-visible" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:webview:default" + }, + { + "description": "Enables the clear_all_browsing_data command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-clear-all-browsing-data" + }, + { + "description": "Enables the create_webview command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-create-webview" + }, + { + "description": "Enables the create_webview_window command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-create-webview-window" + }, + { + "description": "Enables the get_all_webviews command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-get-all-webviews" + }, + { + "description": "Enables the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-internal-toggle-devtools" + }, + { + "description": "Enables the print command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-print" + }, + { + "description": "Enables the reparent command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-reparent" + }, + { + "description": "Enables the set_webview_focus command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-focus" + }, + { + "description": "Enables the set_webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-position" + }, + { + "description": "Enables the set_webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-size" + }, + { + "description": "Enables the set_webview_zoom command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-zoom" + }, + { + "description": "Enables the webview_close command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-close" + }, + { + "description": "Enables the webview_hide command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-hide" + }, + { + "description": "Enables the webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-position" + }, + { + "description": "Enables the webview_show command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-show" + }, + { + "description": "Enables the webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-size" + }, + { + "description": "Denies the clear_all_browsing_data command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-clear-all-browsing-data" + }, + { + "description": "Denies the create_webview command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-create-webview" + }, + { + "description": "Denies the create_webview_window command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-create-webview-window" + }, + { + "description": "Denies the get_all_webviews command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-get-all-webviews" + }, + { + "description": "Denies the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-internal-toggle-devtools" + }, + { + "description": "Denies the print command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-print" + }, + { + "description": "Denies the reparent command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-reparent" + }, + { + "description": "Denies the set_webview_focus command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-focus" + }, + { + "description": "Denies the set_webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-position" + }, + { + "description": "Denies the set_webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-size" + }, + { + "description": "Denies the set_webview_zoom command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-zoom" + }, + { + "description": "Denies the webview_close command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-close" + }, + { + "description": "Denies the webview_hide command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-hide" + }, + { + "description": "Denies the webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-position" + }, + { + "description": "Denies the webview_show command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-show" + }, + { + "description": "Denies the webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-size" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:window:default" + }, + { + "description": "Enables the available_monitors command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-available-monitors" + }, + { + "description": "Enables the center command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-center" + }, + { + "description": "Enables the close command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-close" + }, + { + "description": "Enables the create command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-create" + }, + { + "description": "Enables the current_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-current-monitor" + }, + { + "description": "Enables the cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-cursor-position" + }, + { + "description": "Enables the destroy command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-destroy" + }, + { + "description": "Enables the get_all_windows command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-get-all-windows" + }, + { + "description": "Enables the hide command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-hide" + }, + { + "description": "Enables the inner_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-inner-position" + }, + { + "description": "Enables the inner_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-inner-size" + }, + { + "description": "Enables the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-internal-toggle-maximize" + }, + { + "description": "Enables the is_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-closable" + }, + { + "description": "Enables the is_decorated command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-decorated" + }, + { + "description": "Enables the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-enabled" + }, + { + "description": "Enables the is_focused command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-focused" + }, + { + "description": "Enables the is_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-fullscreen" + }, + { + "description": "Enables the is_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-maximizable" + }, + { + "description": "Enables the is_maximized command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-maximized" + }, + { + "description": "Enables the is_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-minimizable" + }, + { + "description": "Enables the is_minimized command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-minimized" + }, + { + "description": "Enables the is_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-resizable" + }, + { + "description": "Enables the is_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-visible" + }, + { + "description": "Enables the maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-maximize" + }, + { + "description": "Enables the minimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-minimize" + }, + { + "description": "Enables the monitor_from_point command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-monitor-from-point" + }, + { + "description": "Enables the outer_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-outer-position" + }, + { + "description": "Enables the outer_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-outer-size" + }, + { + "description": "Enables the primary_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-primary-monitor" + }, + { + "description": "Enables the request_user_attention command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-request-user-attention" + }, + { + "description": "Enables the scale_factor command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-scale-factor" + }, + { + "description": "Enables the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-always-on-bottom" + }, + { + "description": "Enables the set_always_on_top command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-always-on-top" + }, + { + "description": "Enables the set_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-closable" + }, + { + "description": "Enables the set_content_protected command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-content-protected" + }, + { + "description": "Enables the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-grab" + }, + { + "description": "Enables the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-icon" + }, + { + "description": "Enables the set_cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-position" + }, + { + "description": "Enables the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-visible" + }, + { + "description": "Enables the set_decorations command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-decorations" + }, + { + "description": "Enables the set_effects command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-effects" + }, + { + "description": "Enables the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-enabled" + }, + { + "description": "Enables the set_focus command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-focus" + }, + { + "description": "Enables the set_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-fullscreen" + }, + { + "description": "Enables the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-icon" + }, + { + "description": "Enables the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-ignore-cursor-events" + }, + { + "description": "Enables the set_max_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-max-size" + }, + { + "description": "Enables the set_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-maximizable" + }, + { + "description": "Enables the set_min_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-min-size" + }, + { + "description": "Enables the set_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-minimizable" + }, + { + "description": "Enables the set_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-position" + }, + { + "description": "Enables the set_progress_bar command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-progress-bar" + }, + { + "description": "Enables the set_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-resizable" + }, + { + "description": "Enables the set_shadow command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-shadow" + }, + { + "description": "Enables the set_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-size" + }, + { + "description": "Enables the set_size_constraints command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-size-constraints" + }, + { + "description": "Enables the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-skip-taskbar" + }, + { + "description": "Enables the set_theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-theme" + }, + { + "description": "Enables the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-title" + }, + { + "description": "Enables the set_title_bar_style command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-title-bar-style" + }, + { + "description": "Enables the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-visible-on-all-workspaces" + }, + { + "description": "Enables the show command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-show" + }, + { + "description": "Enables the start_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-start-dragging" + }, + { + "description": "Enables the start_resize_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-start-resize-dragging" + }, + { + "description": "Enables the theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-theme" + }, + { + "description": "Enables the title command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-title" + }, + { + "description": "Enables the toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-toggle-maximize" + }, + { + "description": "Enables the unmaximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-unmaximize" + }, + { + "description": "Enables the unminimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-unminimize" + }, + { + "description": "Denies the available_monitors command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-available-monitors" + }, + { + "description": "Denies the center command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-center" + }, + { + "description": "Denies the close command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-close" + }, + { + "description": "Denies the create command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-create" + }, + { + "description": "Denies the current_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-current-monitor" + }, + { + "description": "Denies the cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-cursor-position" + }, + { + "description": "Denies the destroy command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-destroy" + }, + { + "description": "Denies the get_all_windows command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-get-all-windows" + }, + { + "description": "Denies the hide command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-hide" + }, + { + "description": "Denies the inner_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-inner-position" + }, + { + "description": "Denies the inner_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-inner-size" + }, + { + "description": "Denies the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-internal-toggle-maximize" + }, + { + "description": "Denies the is_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-closable" + }, + { + "description": "Denies the is_decorated command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-decorated" + }, + { + "description": "Denies the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-enabled" + }, + { + "description": "Denies the is_focused command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-focused" + }, + { + "description": "Denies the is_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-fullscreen" + }, + { + "description": "Denies the is_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-maximizable" + }, + { + "description": "Denies the is_maximized command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-maximized" + }, + { + "description": "Denies the is_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-minimizable" + }, + { + "description": "Denies the is_minimized command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-minimized" + }, + { + "description": "Denies the is_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-resizable" + }, + { + "description": "Denies the is_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-visible" + }, + { + "description": "Denies the maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-maximize" + }, + { + "description": "Denies the minimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-minimize" + }, + { + "description": "Denies the monitor_from_point command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-monitor-from-point" + }, + { + "description": "Denies the outer_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-outer-position" + }, + { + "description": "Denies the outer_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-outer-size" + }, + { + "description": "Denies the primary_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-primary-monitor" + }, + { + "description": "Denies the request_user_attention command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-request-user-attention" + }, + { + "description": "Denies the scale_factor command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-scale-factor" + }, + { + "description": "Denies the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-always-on-bottom" + }, + { + "description": "Denies the set_always_on_top command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-always-on-top" + }, + { + "description": "Denies the set_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-closable" + }, + { + "description": "Denies the set_content_protected command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-content-protected" + }, + { + "description": "Denies the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-grab" + }, + { + "description": "Denies the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-icon" + }, + { + "description": "Denies the set_cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-position" + }, + { + "description": "Denies the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-visible" + }, + { + "description": "Denies the set_decorations command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-decorations" + }, + { + "description": "Denies the set_effects command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-effects" + }, + { + "description": "Denies the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-enabled" + }, + { + "description": "Denies the set_focus command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-focus" + }, + { + "description": "Denies the set_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-fullscreen" + }, + { + "description": "Denies the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-icon" + }, + { + "description": "Denies the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-ignore-cursor-events" + }, + { + "description": "Denies the set_max_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-max-size" + }, + { + "description": "Denies the set_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-maximizable" + }, + { + "description": "Denies the set_min_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-min-size" + }, + { + "description": "Denies the set_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-minimizable" + }, + { + "description": "Denies the set_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-position" + }, + { + "description": "Denies the set_progress_bar command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-progress-bar" + }, + { + "description": "Denies the set_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-resizable" + }, + { + "description": "Denies the set_shadow command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-shadow" + }, + { + "description": "Denies the set_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-size" + }, + { + "description": "Denies the set_size_constraints command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-size-constraints" + }, + { + "description": "Denies the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-skip-taskbar" + }, + { + "description": "Denies the set_theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-theme" + }, + { + "description": "Denies the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-title" + }, + { + "description": "Denies the set_title_bar_style command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-title-bar-style" + }, + { + "description": "Denies the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-visible-on-all-workspaces" + }, + { + "description": "Denies the show command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-show" + }, + { + "description": "Denies the start_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-start-dragging" + }, + { + "description": "Denies the start_resize_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-start-resize-dragging" + }, + { + "description": "Denies the theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-theme" + }, + { + "description": "Denies the title command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-title" + }, + { + "description": "Denies the toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-toggle-maximize" + }, + { + "description": "Denies the unmaximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-unmaximize" + }, + { + "description": "Denies the unminimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-unminimize" + }, + { + "description": "Allows reading the opened deep link via the get_current command", + "type": "string", + "const": "deep-link:default" + }, + { + "description": "Enables the get_current command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-get-current" + }, + { + "description": "Enables the is_registered command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-is-registered" + }, + { + "description": "Enables the register command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-register" + }, + { + "description": "Enables the unregister command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-unregister" + }, + { + "description": "Denies the get_current command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-get-current" + }, + { + "description": "Denies the is_registered command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-is-registered" + }, + { + "description": "Denies the register command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-register" + }, + { + "description": "Denies the unregister command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-unregister" + }, + { + "description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n", + "type": "string", + "const": "dialog:default" + }, + { + "description": "Enables the ask command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-ask" + }, + { + "description": "Enables the confirm command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-confirm" + }, + { + "description": "Enables the message command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-message" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-open" + }, + { + "description": "Enables the save command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-save" + }, + { + "description": "Denies the ask command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-ask" + }, + { + "description": "Denies the confirm command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-confirm" + }, + { + "description": "Denies the message command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-message" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-open" + }, + { + "description": "Denies the save command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-save" + }, + { + "description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "const": "fs:default" + }, + { + "description": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta" + }, + { + "description": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the application folders.", + "type": "string", + "const": "fs:allow-app-read" + }, + { + "description": "This allows full recursive read access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-read-recursive" + }, + { + "description": "This allows non-recursive write access to the application folders.", + "type": "string", + "const": "fs:allow-app-write" + }, + { + "description": "This allows full recursive write access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-read" + }, + { + "description": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-write" + }, + { + "description": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-read" + }, + { + "description": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-write" + }, + { + "description": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-read" + }, + { + "description": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-write" + }, + { + "description": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-read" + }, + { + "description": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-write" + }, + { + "description": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-read" + }, + { + "description": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-write" + }, + { + "description": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-read" + }, + { + "description": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-write" + }, + { + "description": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-read" + }, + { + "description": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-write" + }, + { + "description": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-read" + }, + { + "description": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-write" + }, + { + "description": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-read" + }, + { + "description": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-write" + }, + { + "description": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-read" + }, + { + "description": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-write" + }, + { + "description": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-read" + }, + { + "description": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-write" + }, + { + "description": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-read" + }, + { + "description": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-write" + }, + { + "description": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-read" + }, + { + "description": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-write" + }, + { + "description": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-write-recursive" + }, + { + "description": "This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "const": "fs:deny-default" + }, + { + "description": "Enables the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-copy-file" + }, + { + "description": "Enables the create command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-create" + }, + { + "description": "Enables the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-exists" + }, + { + "description": "Enables the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-fstat" + }, + { + "description": "Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-ftruncate" + }, + { + "description": "Enables the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-lstat" + }, + { + "description": "Enables the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-mkdir" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-open" + }, + { + "description": "Enables the read command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read" + }, + { + "description": "Enables the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-dir" + }, + { + "description": "Enables the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-file" + }, + { + "description": "Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file" + }, + { + "description": "Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines" + }, + { + "description": "Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines-next" + }, + { + "description": "Enables the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-remove" + }, + { + "description": "Enables the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-rename" + }, + { + "description": "Enables the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-seek" + }, + { + "description": "Enables the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-stat" + }, + { + "description": "Enables the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-truncate" + }, + { + "description": "Enables the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-unwatch" + }, + { + "description": "Enables the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-watch" + }, + { + "description": "Enables the write command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write" + }, + { + "description": "Enables the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-file" + }, + { + "description": "Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-text-file" + }, + { + "description": "This permissions allows to create the application specific directories.\n", + "type": "string", + "const": "fs:create-app-specific-dirs" + }, + { + "description": "Denies the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-copy-file" + }, + { + "description": "Denies the create command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-create" + }, + { + "description": "Denies the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-exists" + }, + { + "description": "Denies the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-fstat" + }, + { + "description": "Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-ftruncate" + }, + { + "description": "Denies the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-lstat" + }, + { + "description": "Denies the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-mkdir" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-open" + }, + { + "description": "Denies the read command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read" + }, + { + "description": "Denies the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-dir" + }, + { + "description": "Denies the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-file" + }, + { + "description": "Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file" + }, + { + "description": "Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines" + }, + { + "description": "Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines-next" + }, + { + "description": "Denies the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-remove" + }, + { + "description": "Denies the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-rename" + }, + { + "description": "Denies the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-seek" + }, + { + "description": "Denies the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-stat" + }, + { + "description": "Denies the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-truncate" + }, + { + "description": "Denies the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-unwatch" + }, + { + "description": "Denies the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-watch" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-linux" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-windows" + }, + { + "description": "Denies the write command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write" + }, + { + "description": "Denies the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-file" + }, + { + "description": "Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-text-file" + }, + { + "description": "This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-all" + }, + { + "description": "This permission allows recursive read functionality on the application\nspecific base directories. \n", + "type": "string", + "const": "fs:read-app-specific-dirs-recursive" + }, + { + "description": "This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-dirs" + }, + { + "description": "This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-files" + }, + { + "description": "This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-meta" + }, + { + "description": "An empty permission you can use to modify the global scope.", + "type": "string", + "const": "fs:scope" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the application folders.", + "type": "string", + "const": "fs:scope-app" + }, + { + "description": "This scope permits to list all files and folders in the application directories.", + "type": "string", + "const": "fs:scope-app-index" + }, + { + "description": "This scope permits recursive access to the complete application folders, including sub directories and files.", + "type": "string", + "const": "fs:scope-app-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", + "type": "string", + "const": "fs:scope-appcache" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "const": "fs:scope-appcache-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appcache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:scope-appconfig" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "const": "fs:scope-appconfig-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appconfig-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", + "type": "string", + "const": "fs:scope-appdata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "const": "fs:scope-appdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:scope-applocaldata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "const": "fs:scope-applocaldata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applocaldata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", + "type": "string", + "const": "fs:scope-applog" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "const": "fs:scope-applog-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applog-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", + "type": "string", + "const": "fs:scope-audio" + }, + { + "description": "This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "const": "fs:scope-audio-index" + }, + { + "description": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-audio-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", + "type": "string", + "const": "fs:scope-cache" + }, + { + "description": "This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "const": "fs:scope-cache-index" + }, + { + "description": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-cache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", + "type": "string", + "const": "fs:scope-config" + }, + { + "description": "This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "const": "fs:scope-config-index" + }, + { + "description": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-config-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DATA` folder.", + "type": "string", + "const": "fs:scope-data" + }, + { + "description": "This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "const": "fs:scope-data-index" + }, + { + "description": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-data-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", + "type": "string", + "const": "fs:scope-desktop" + }, + { + "description": "This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "const": "fs:scope-desktop-index" + }, + { + "description": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-desktop-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:scope-document" + }, + { + "description": "This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "const": "fs:scope-document-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-document-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:scope-download" + }, + { + "description": "This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "const": "fs:scope-download-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-download-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$EXE` folder.", + "type": "string", + "const": "fs:scope-exe" + }, + { + "description": "This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "const": "fs:scope-exe-index" + }, + { + "description": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-exe-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$FONT` folder.", + "type": "string", + "const": "fs:scope-font" + }, + { + "description": "This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "const": "fs:scope-font-index" + }, + { + "description": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-font-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$HOME` folder.", + "type": "string", + "const": "fs:scope-home" + }, + { + "description": "This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "const": "fs:scope-home-index" + }, + { + "description": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-home-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:scope-localdata" + }, + { + "description": "This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "const": "fs:scope-localdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-localdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOG` folder.", + "type": "string", + "const": "fs:scope-log" + }, + { + "description": "This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "const": "fs:scope-log-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-log-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", + "type": "string", + "const": "fs:scope-picture" + }, + { + "description": "This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "const": "fs:scope-picture-index" + }, + { + "description": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-picture-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", + "type": "string", + "const": "fs:scope-public" + }, + { + "description": "This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "const": "fs:scope-public-index" + }, + { + "description": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-public-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", + "type": "string", + "const": "fs:scope-resource" + }, + { + "description": "This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "const": "fs:scope-resource-index" + }, + { + "description": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-resource-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", + "type": "string", + "const": "fs:scope-runtime" + }, + { + "description": "This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "const": "fs:scope-runtime-index" + }, + { + "description": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-runtime-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", + "type": "string", + "const": "fs:scope-temp" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "const": "fs:scope-temp-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-temp-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:scope-template" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "const": "fs:scope-template-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-template-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", + "type": "string", + "const": "fs:scope-video" + }, + { + "description": "This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "const": "fs:scope-video-index" + }, + { + "description": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-video-recursive" + }, + { + "description": "This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-all" + }, + { + "description": "This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-files" + }, + { + "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n", + "type": "string", + "const": "http:default" + }, + { + "description": "Enables the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch" + }, + { + "description": "Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-cancel" + }, + { + "description": "Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-read-body" + }, + { + "description": "Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-send" + }, + { + "description": "Denies the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch" + }, + { + "description": "Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-cancel" + }, + { + "description": "Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-read-body" + }, + { + "description": "Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-send" + }, + { + "description": "This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n", + "type": "string", + "const": "os:default" + }, + { + "description": "Enables the arch command without any pre-configured scope.", + "type": "string", + "const": "os:allow-arch" + }, + { + "description": "Enables the exe_extension command without any pre-configured scope.", + "type": "string", + "const": "os:allow-exe-extension" + }, + { + "description": "Enables the family command without any pre-configured scope.", + "type": "string", + "const": "os:allow-family" + }, + { + "description": "Enables the hostname command without any pre-configured scope.", + "type": "string", + "const": "os:allow-hostname" + }, + { + "description": "Enables the locale command without any pre-configured scope.", + "type": "string", + "const": "os:allow-locale" + }, + { + "description": "Enables the os_type command without any pre-configured scope.", + "type": "string", + "const": "os:allow-os-type" + }, + { + "description": "Enables the platform command without any pre-configured scope.", + "type": "string", + "const": "os:allow-platform" + }, + { + "description": "Enables the version command without any pre-configured scope.", + "type": "string", + "const": "os:allow-version" + }, + { + "description": "Denies the arch command without any pre-configured scope.", + "type": "string", + "const": "os:deny-arch" + }, + { + "description": "Denies the exe_extension command without any pre-configured scope.", + "type": "string", + "const": "os:deny-exe-extension" + }, + { + "description": "Denies the family command without any pre-configured scope.", + "type": "string", + "const": "os:deny-family" + }, + { + "description": "Denies the hostname command without any pre-configured scope.", + "type": "string", + "const": "os:deny-hostname" + }, + { + "description": "Denies the locale command without any pre-configured scope.", + "type": "string", + "const": "os:deny-locale" + }, + { + "description": "Denies the os_type command without any pre-configured scope.", + "type": "string", + "const": "os:deny-os-type" + }, + { + "description": "Denies the platform command without any pre-configured scope.", + "type": "string", + "const": "os:deny-platform" + }, + { + "description": "Denies the version command without any pre-configured scope.", + "type": "string", + "const": "os:deny-version" + }, + { + "description": "This permission set configures which\nprocess feeatures are by default exposed.\n\n#### Granted Permissions\n\nThis enables to quit via `allow-exit` and restart via `allow-restart`\nthe application.\n", + "type": "string", + "const": "process:default" + }, + { + "description": "Enables the exit command without any pre-configured scope.", + "type": "string", + "const": "process:allow-exit" + }, + { + "description": "Enables the restart command without any pre-configured scope.", + "type": "string", + "const": "process:allow-restart" + }, + { + "description": "Denies the exit command without any pre-configured scope.", + "type": "string", + "const": "process:deny-exit" + }, + { + "description": "Denies the restart command without any pre-configured scope.", + "type": "string", + "const": "process:deny-restart" + }, + { + "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality without any specific\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n", + "type": "string", + "const": "shell:default" + }, + { + "description": "Enables the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-execute" + }, + { + "description": "Enables the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-kill" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-open" + }, + { + "description": "Enables the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-spawn" + }, + { + "description": "Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-stdin-write" + }, + { + "description": "Denies the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-execute" + }, + { + "description": "Denies the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-kill" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-open" + }, + { + "description": "Denies the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-spawn" + }, + { + "description": "Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-stdin-write" + }, + { + "description": "This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n", + "type": "string", + "const": "updater:default" + }, + { + "description": "Enables the check command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-check" + }, + { + "description": "Enables the download command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-download" + }, + { + "description": "Enables the download_and_install command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-download-and-install" + }, + { + "description": "Enables the install command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-install" + }, + { + "description": "Denies the check command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-check" + }, + { + "description": "Denies the download command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-download" + }, + { + "description": "Denies the download_and_install command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-download-and-install" + }, + { + "description": "Denies the install command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-install" + } + ] + }, + "Value": { + "description": "All supported ACL values.", + "anyOf": [ + { + "description": "Represents a null JSON value.", + "type": "null" + }, + { + "description": "Represents a [`bool`].", + "type": "boolean" + }, + { + "description": "Represents a valid ACL [`Number`].", + "allOf": [ + { + "$ref": "#/definitions/Number" + } + ] + }, + { + "description": "Represents a [`String`].", + "type": "string" + }, + { + "description": "Represents a list of other [`Value`]s.", + "type": "array", + "items": { + "$ref": "#/definitions/Value" + } + }, + { + "description": "Represents a map of [`String`] keys to [`Value`]s.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Value" + } + } + ] + }, + "Number": { + "description": "A valid ACL number.", + "anyOf": [ + { + "description": "Represents an [`i64`].", + "type": "integer", + "format": "int64" + }, + { + "description": "Represents a [`f64`].", + "type": "number", + "format": "double" + } + ] + }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, + "ShellScopeEntryAllowedArg": { + "description": "A command argument allowed to be executed by the webview API.", + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "description": "A variable that is set while calling the command from the webview API.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "raw": { + "description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.", + "default": false, + "type": "boolean" + }, + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "ShellScopeEntryAllowedArgs": { + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/ShellScopeEntryAllowedArg" + } + } + ] + } + } +} \ No newline at end of file diff --git a/src-tauri/gen/schemas/windows-schema.json b/src-tauri/gen/schemas/windows-schema.json new file mode 100644 index 00000000..49c92a37 --- /dev/null +++ b/src-tauri/gen/schemas/windows-schema.json @@ -0,0 +1,5403 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CapabilityFile", + "description": "Capability formats accepted in a capability file.", + "anyOf": [ + { + "description": "A single capability.", + "allOf": [ + { + "$ref": "#/definitions/Capability" + } + ] + }, + { + "description": "A list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + }, + { + "description": "A list of capabilities.", + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "description": "The list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + } + } + } + ], + "definitions": { + "Capability": { + "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```", + "type": "object", + "required": [ + "identifier", + "permissions" + ], + "properties": { + "identifier": { + "description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`", + "type": "string" + }, + "description": { + "description": "Description of what the capability is intended to allow on associated windows.\n\nIt should contain a description of what the grouped permissions should allow.\n\n## Example\n\nThis capability allows the `main` window access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.", + "default": "", + "type": "string" + }, + "remote": { + "description": "Configure remote URLs that can use the capability permissions.\n\nThis setting is optional and defaults to not being set, as our default use case is that the content is served from our local application.\n\n:::caution Make sure you understand the security implications of providing remote sources with local system access. :::\n\n## Example\n\n```json { \"urls\": [\"https://*.mydomain.dev\"] } ```", + "anyOf": [ + { + "$ref": "#/definitions/CapabilityRemote" + }, + { + "type": "null" + } + ] + }, + "local": { + "description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.", + "default": true, + "type": "boolean" + }, + "windows": { + "description": "List of windows that are affected by this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.\n\n## Example\n\n`[\"main\"]`", + "type": "array", + "items": { + "type": "string" + } + }, + "webviews": { + "description": "List of webviews that are affected by this capability. Can be a glob pattern.\n\nThis is only required when using on multiwebview contexts, by default all child webviews of a window that matches [`Self::windows`] are linked.\n\n## Example\n\n`[\"sub-webview-one\", \"sub-webview-two\"]`", + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```", + "type": "array", + "items": { + "$ref": "#/definitions/PermissionEntry" + }, + "uniqueItems": true + }, + "platforms": { + "description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Target" + } + } + } + }, + "CapabilityRemote": { + "description": "Configuration for remote URLs that are associated with the capability.", + "type": "object", + "required": [ + "urls" + ], + "properties": { + "urls": { + "description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PermissionEntry": { + "description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.", + "anyOf": [ + { + "description": "Reference a permission or permission set by identifier.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + }, + { + "description": "Reference a permission or permission set by identifier and extends its scope.", + "type": "object", + "allOf": [ + { + "if": { + "properties": { + "identifier": { + "anyOf": [ + { + "description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "const": "fs:default" + }, + { + "description": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta" + }, + { + "description": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the application folders.", + "type": "string", + "const": "fs:allow-app-read" + }, + { + "description": "This allows full recursive read access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-read-recursive" + }, + { + "description": "This allows non-recursive write access to the application folders.", + "type": "string", + "const": "fs:allow-app-write" + }, + { + "description": "This allows full recursive write access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-read" + }, + { + "description": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-write" + }, + { + "description": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-read" + }, + { + "description": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-write" + }, + { + "description": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-read" + }, + { + "description": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-write" + }, + { + "description": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-read" + }, + { + "description": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-write" + }, + { + "description": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-read" + }, + { + "description": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-write" + }, + { + "description": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-read" + }, + { + "description": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-write" + }, + { + "description": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-read" + }, + { + "description": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-write" + }, + { + "description": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-read" + }, + { + "description": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-write" + }, + { + "description": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-read" + }, + { + "description": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-write" + }, + { + "description": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-read" + }, + { + "description": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-write" + }, + { + "description": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-read" + }, + { + "description": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-write" + }, + { + "description": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-read" + }, + { + "description": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-write" + }, + { + "description": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-read" + }, + { + "description": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-write" + }, + { + "description": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-write-recursive" + }, + { + "description": "This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "const": "fs:deny-default" + }, + { + "description": "Enables the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-copy-file" + }, + { + "description": "Enables the create command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-create" + }, + { + "description": "Enables the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-exists" + }, + { + "description": "Enables the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-fstat" + }, + { + "description": "Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-ftruncate" + }, + { + "description": "Enables the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-lstat" + }, + { + "description": "Enables the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-mkdir" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-open" + }, + { + "description": "Enables the read command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read" + }, + { + "description": "Enables the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-dir" + }, + { + "description": "Enables the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-file" + }, + { + "description": "Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file" + }, + { + "description": "Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines" + }, + { + "description": "Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines-next" + }, + { + "description": "Enables the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-remove" + }, + { + "description": "Enables the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-rename" + }, + { + "description": "Enables the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-seek" + }, + { + "description": "Enables the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-stat" + }, + { + "description": "Enables the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-truncate" + }, + { + "description": "Enables the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-unwatch" + }, + { + "description": "Enables the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-watch" + }, + { + "description": "Enables the write command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write" + }, + { + "description": "Enables the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-file" + }, + { + "description": "Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-text-file" + }, + { + "description": "This permissions allows to create the application specific directories.\n", + "type": "string", + "const": "fs:create-app-specific-dirs" + }, + { + "description": "Denies the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-copy-file" + }, + { + "description": "Denies the create command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-create" + }, + { + "description": "Denies the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-exists" + }, + { + "description": "Denies the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-fstat" + }, + { + "description": "Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-ftruncate" + }, + { + "description": "Denies the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-lstat" + }, + { + "description": "Denies the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-mkdir" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-open" + }, + { + "description": "Denies the read command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read" + }, + { + "description": "Denies the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-dir" + }, + { + "description": "Denies the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-file" + }, + { + "description": "Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file" + }, + { + "description": "Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines" + }, + { + "description": "Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines-next" + }, + { + "description": "Denies the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-remove" + }, + { + "description": "Denies the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-rename" + }, + { + "description": "Denies the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-seek" + }, + { + "description": "Denies the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-stat" + }, + { + "description": "Denies the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-truncate" + }, + { + "description": "Denies the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-unwatch" + }, + { + "description": "Denies the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-watch" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-linux" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-windows" + }, + { + "description": "Denies the write command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write" + }, + { + "description": "Denies the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-file" + }, + { + "description": "Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-text-file" + }, + { + "description": "This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-all" + }, + { + "description": "This permission allows recursive read functionality on the application\nspecific base directories. \n", + "type": "string", + "const": "fs:read-app-specific-dirs-recursive" + }, + { + "description": "This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-dirs" + }, + { + "description": "This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-files" + }, + { + "description": "This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-meta" + }, + { + "description": "An empty permission you can use to modify the global scope.", + "type": "string", + "const": "fs:scope" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the application folders.", + "type": "string", + "const": "fs:scope-app" + }, + { + "description": "This scope permits to list all files and folders in the application directories.", + "type": "string", + "const": "fs:scope-app-index" + }, + { + "description": "This scope permits recursive access to the complete application folders, including sub directories and files.", + "type": "string", + "const": "fs:scope-app-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", + "type": "string", + "const": "fs:scope-appcache" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "const": "fs:scope-appcache-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appcache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:scope-appconfig" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "const": "fs:scope-appconfig-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appconfig-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", + "type": "string", + "const": "fs:scope-appdata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "const": "fs:scope-appdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:scope-applocaldata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "const": "fs:scope-applocaldata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applocaldata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", + "type": "string", + "const": "fs:scope-applog" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "const": "fs:scope-applog-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applog-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", + "type": "string", + "const": "fs:scope-audio" + }, + { + "description": "This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "const": "fs:scope-audio-index" + }, + { + "description": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-audio-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", + "type": "string", + "const": "fs:scope-cache" + }, + { + "description": "This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "const": "fs:scope-cache-index" + }, + { + "description": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-cache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", + "type": "string", + "const": "fs:scope-config" + }, + { + "description": "This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "const": "fs:scope-config-index" + }, + { + "description": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-config-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DATA` folder.", + "type": "string", + "const": "fs:scope-data" + }, + { + "description": "This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "const": "fs:scope-data-index" + }, + { + "description": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-data-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", + "type": "string", + "const": "fs:scope-desktop" + }, + { + "description": "This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "const": "fs:scope-desktop-index" + }, + { + "description": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-desktop-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:scope-document" + }, + { + "description": "This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "const": "fs:scope-document-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-document-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:scope-download" + }, + { + "description": "This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "const": "fs:scope-download-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-download-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$EXE` folder.", + "type": "string", + "const": "fs:scope-exe" + }, + { + "description": "This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "const": "fs:scope-exe-index" + }, + { + "description": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-exe-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$FONT` folder.", + "type": "string", + "const": "fs:scope-font" + }, + { + "description": "This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "const": "fs:scope-font-index" + }, + { + "description": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-font-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$HOME` folder.", + "type": "string", + "const": "fs:scope-home" + }, + { + "description": "This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "const": "fs:scope-home-index" + }, + { + "description": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-home-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:scope-localdata" + }, + { + "description": "This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "const": "fs:scope-localdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-localdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOG` folder.", + "type": "string", + "const": "fs:scope-log" + }, + { + "description": "This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "const": "fs:scope-log-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-log-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", + "type": "string", + "const": "fs:scope-picture" + }, + { + "description": "This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "const": "fs:scope-picture-index" + }, + { + "description": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-picture-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", + "type": "string", + "const": "fs:scope-public" + }, + { + "description": "This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "const": "fs:scope-public-index" + }, + { + "description": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-public-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", + "type": "string", + "const": "fs:scope-resource" + }, + { + "description": "This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "const": "fs:scope-resource-index" + }, + { + "description": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-resource-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", + "type": "string", + "const": "fs:scope-runtime" + }, + { + "description": "This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "const": "fs:scope-runtime-index" + }, + { + "description": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-runtime-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", + "type": "string", + "const": "fs:scope-temp" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "const": "fs:scope-temp-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-temp-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:scope-template" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "const": "fs:scope-template-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-template-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", + "type": "string", + "const": "fs:scope-video" + }, + { + "description": "This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "const": "fs:scope-video-index" + }, + { + "description": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-video-recursive" + }, + { + "description": "This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-all" + }, + { + "description": "This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-files" + } + ] + } + } + }, + "then": { + "properties": { + "allow": { + "items": { + "title": "FsScopeEntry", + "description": "FS scope entry.", + "anyOf": [ + { + "description": "FS scope path.", + "type": "string" + }, + { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "FS scope path.", + "type": "string" + } + } + } + ] + } + }, + "deny": { + "items": { + "title": "FsScopeEntry", + "description": "FS scope entry.", + "anyOf": [ + { + "description": "FS scope path.", + "type": "string" + }, + { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "FS scope path.", + "type": "string" + } + } + } + ] + } + } + } + }, + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + } + } + }, + { + "if": { + "properties": { + "identifier": { + "anyOf": [ + { + "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n", + "type": "string", + "const": "http:default" + }, + { + "description": "Enables the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch" + }, + { + "description": "Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-cancel" + }, + { + "description": "Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-read-body" + }, + { + "description": "Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-send" + }, + { + "description": "Denies the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch" + }, + { + "description": "Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-cancel" + }, + { + "description": "Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-read-body" + }, + { + "description": "Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-send" + } + ] + } + } + }, + "then": { + "properties": { + "allow": { + "items": { + "title": "HttpScopeEntry", + "description": "HTTP scope entry.", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } + } + ] + } + }, + "deny": { + "items": { + "title": "HttpScopeEntry", + "description": "HTTP scope entry.", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } + } + ] + } + } + } + }, + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + } + } + }, + { + "if": { + "properties": { + "identifier": { + "anyOf": [ + { + "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality without any specific\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n", + "type": "string", + "const": "shell:default" + }, + { + "description": "Enables the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-execute" + }, + { + "description": "Enables the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-kill" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-open" + }, + { + "description": "Enables the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-spawn" + }, + { + "description": "Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-stdin-write" + }, + { + "description": "Denies the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-execute" + }, + { + "description": "Denies the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-kill" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-open" + }, + { + "description": "Denies the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-spawn" + }, + { + "description": "Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-stdin-write" + } + ] + } + } + }, + "then": { + "properties": { + "allow": { + "items": { + "title": "ShellScopeEntry", + "description": "Shell scope entry.", + "anyOf": [ + { + "type": "object", + "required": [ + "cmd", + "name" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "additionalProperties": false + } + ] + } + }, + "deny": { + "items": { + "title": "ShellScopeEntry", + "description": "Shell scope entry.", + "anyOf": [ + { + "type": "object", + "required": [ + "cmd", + "name" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" + } + ] + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "additionalProperties": false + } + ] + } + } + } + }, + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + } + } + }, + { + "properties": { + "identifier": { + "description": "Identifier of the permission or permission set.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + }, + "allow": { + "description": "Data that defines what is allowed by the scope.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Value" + } + }, + "deny": { + "description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Value" + } + } + } + } + ], + "required": [ + "identifier" + ] + } + ] + }, + "Identifier": { + "description": "Permission identifier", + "oneOf": [ + { + "description": "Default core plugins set which includes:\n- 'core:path:default'\n- 'core:event:default'\n- 'core:window:default'\n- 'core:webview:default'\n- 'core:app:default'\n- 'core:image:default'\n- 'core:resources:default'\n- 'core:menu:default'\n- 'core:tray:default'\n", + "type": "string", + "const": "core:default" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:app:default" + }, + { + "description": "Enables the app_hide command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-app-hide" + }, + { + "description": "Enables the app_show command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-app-show" + }, + { + "description": "Enables the default_window_icon command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-default-window-icon" + }, + { + "description": "Enables the name command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-name" + }, + { + "description": "Enables the set_app_theme command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-set-app-theme" + }, + { + "description": "Enables the tauri_version command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-tauri-version" + }, + { + "description": "Enables the version command without any pre-configured scope.", + "type": "string", + "const": "core:app:allow-version" + }, + { + "description": "Denies the app_hide command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-app-hide" + }, + { + "description": "Denies the app_show command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-app-show" + }, + { + "description": "Denies the default_window_icon command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-default-window-icon" + }, + { + "description": "Denies the name command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-name" + }, + { + "description": "Denies the set_app_theme command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-set-app-theme" + }, + { + "description": "Denies the tauri_version command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-tauri-version" + }, + { + "description": "Denies the version command without any pre-configured scope.", + "type": "string", + "const": "core:app:deny-version" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:event:default" + }, + { + "description": "Enables the emit command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-emit" + }, + { + "description": "Enables the emit_to command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-emit-to" + }, + { + "description": "Enables the listen command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-listen" + }, + { + "description": "Enables the unlisten command without any pre-configured scope.", + "type": "string", + "const": "core:event:allow-unlisten" + }, + { + "description": "Denies the emit command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-emit" + }, + { + "description": "Denies the emit_to command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-emit-to" + }, + { + "description": "Denies the listen command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-listen" + }, + { + "description": "Denies the unlisten command without any pre-configured scope.", + "type": "string", + "const": "core:event:deny-unlisten" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:image:default" + }, + { + "description": "Enables the from_bytes command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-from-bytes" + }, + { + "description": "Enables the from_path command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-from-path" + }, + { + "description": "Enables the new command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-new" + }, + { + "description": "Enables the rgba command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-rgba" + }, + { + "description": "Enables the size command without any pre-configured scope.", + "type": "string", + "const": "core:image:allow-size" + }, + { + "description": "Denies the from_bytes command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-from-bytes" + }, + { + "description": "Denies the from_path command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-from-path" + }, + { + "description": "Denies the new command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-new" + }, + { + "description": "Denies the rgba command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-rgba" + }, + { + "description": "Denies the size command without any pre-configured scope.", + "type": "string", + "const": "core:image:deny-size" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:menu:default" + }, + { + "description": "Enables the append command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-append" + }, + { + "description": "Enables the create_default command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-create-default" + }, + { + "description": "Enables the get command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-get" + }, + { + "description": "Enables the insert command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-insert" + }, + { + "description": "Enables the is_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-is-checked" + }, + { + "description": "Enables the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-is-enabled" + }, + { + "description": "Enables the items command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-items" + }, + { + "description": "Enables the new command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-new" + }, + { + "description": "Enables the popup command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-popup" + }, + { + "description": "Enables the prepend command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-prepend" + }, + { + "description": "Enables the remove command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-remove" + }, + { + "description": "Enables the remove_at command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-remove-at" + }, + { + "description": "Enables the set_accelerator command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-accelerator" + }, + { + "description": "Enables the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-app-menu" + }, + { + "description": "Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-help-menu-for-nsapp" + }, + { + "description": "Enables the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-window-menu" + }, + { + "description": "Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-as-windows-menu-for-nsapp" + }, + { + "description": "Enables the set_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-checked" + }, + { + "description": "Enables the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-enabled" + }, + { + "description": "Enables the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-icon" + }, + { + "description": "Enables the set_text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-set-text" + }, + { + "description": "Enables the text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:allow-text" + }, + { + "description": "Denies the append command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-append" + }, + { + "description": "Denies the create_default command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-create-default" + }, + { + "description": "Denies the get command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-get" + }, + { + "description": "Denies the insert command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-insert" + }, + { + "description": "Denies the is_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-is-checked" + }, + { + "description": "Denies the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-is-enabled" + }, + { + "description": "Denies the items command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-items" + }, + { + "description": "Denies the new command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-new" + }, + { + "description": "Denies the popup command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-popup" + }, + { + "description": "Denies the prepend command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-prepend" + }, + { + "description": "Denies the remove command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-remove" + }, + { + "description": "Denies the remove_at command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-remove-at" + }, + { + "description": "Denies the set_accelerator command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-accelerator" + }, + { + "description": "Denies the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-app-menu" + }, + { + "description": "Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-help-menu-for-nsapp" + }, + { + "description": "Denies the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-window-menu" + }, + { + "description": "Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-as-windows-menu-for-nsapp" + }, + { + "description": "Denies the set_checked command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-checked" + }, + { + "description": "Denies the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-enabled" + }, + { + "description": "Denies the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-icon" + }, + { + "description": "Denies the set_text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-set-text" + }, + { + "description": "Denies the text command without any pre-configured scope.", + "type": "string", + "const": "core:menu:deny-text" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:path:default" + }, + { + "description": "Enables the basename command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-basename" + }, + { + "description": "Enables the dirname command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-dirname" + }, + { + "description": "Enables the extname command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-extname" + }, + { + "description": "Enables the is_absolute command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-is-absolute" + }, + { + "description": "Enables the join command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-join" + }, + { + "description": "Enables the normalize command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-normalize" + }, + { + "description": "Enables the resolve command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-resolve" + }, + { + "description": "Enables the resolve_directory command without any pre-configured scope.", + "type": "string", + "const": "core:path:allow-resolve-directory" + }, + { + "description": "Denies the basename command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-basename" + }, + { + "description": "Denies the dirname command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-dirname" + }, + { + "description": "Denies the extname command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-extname" + }, + { + "description": "Denies the is_absolute command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-is-absolute" + }, + { + "description": "Denies the join command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-join" + }, + { + "description": "Denies the normalize command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-normalize" + }, + { + "description": "Denies the resolve command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-resolve" + }, + { + "description": "Denies the resolve_directory command without any pre-configured scope.", + "type": "string", + "const": "core:path:deny-resolve-directory" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:resources:default" + }, + { + "description": "Enables the close command without any pre-configured scope.", + "type": "string", + "const": "core:resources:allow-close" + }, + { + "description": "Denies the close command without any pre-configured scope.", + "type": "string", + "const": "core:resources:deny-close" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:tray:default" + }, + { + "description": "Enables the get_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-get-by-id" + }, + { + "description": "Enables the new command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-new" + }, + { + "description": "Enables the remove_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-remove-by-id" + }, + { + "description": "Enables the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-icon" + }, + { + "description": "Enables the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-icon-as-template" + }, + { + "description": "Enables the set_menu command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-menu" + }, + { + "description": "Enables the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-show-menu-on-left-click" + }, + { + "description": "Enables the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-temp-dir-path" + }, + { + "description": "Enables the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-title" + }, + { + "description": "Enables the set_tooltip command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-tooltip" + }, + { + "description": "Enables the set_visible command without any pre-configured scope.", + "type": "string", + "const": "core:tray:allow-set-visible" + }, + { + "description": "Denies the get_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-get-by-id" + }, + { + "description": "Denies the new command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-new" + }, + { + "description": "Denies the remove_by_id command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-remove-by-id" + }, + { + "description": "Denies the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-icon" + }, + { + "description": "Denies the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-icon-as-template" + }, + { + "description": "Denies the set_menu command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-menu" + }, + { + "description": "Denies the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-show-menu-on-left-click" + }, + { + "description": "Denies the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-temp-dir-path" + }, + { + "description": "Denies the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-title" + }, + { + "description": "Denies the set_tooltip command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-tooltip" + }, + { + "description": "Denies the set_visible command without any pre-configured scope.", + "type": "string", + "const": "core:tray:deny-set-visible" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:webview:default" + }, + { + "description": "Enables the clear_all_browsing_data command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-clear-all-browsing-data" + }, + { + "description": "Enables the create_webview command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-create-webview" + }, + { + "description": "Enables the create_webview_window command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-create-webview-window" + }, + { + "description": "Enables the get_all_webviews command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-get-all-webviews" + }, + { + "description": "Enables the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-internal-toggle-devtools" + }, + { + "description": "Enables the print command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-print" + }, + { + "description": "Enables the reparent command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-reparent" + }, + { + "description": "Enables the set_webview_focus command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-focus" + }, + { + "description": "Enables the set_webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-position" + }, + { + "description": "Enables the set_webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-size" + }, + { + "description": "Enables the set_webview_zoom command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-set-webview-zoom" + }, + { + "description": "Enables the webview_close command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-close" + }, + { + "description": "Enables the webview_hide command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-hide" + }, + { + "description": "Enables the webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-position" + }, + { + "description": "Enables the webview_show command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-show" + }, + { + "description": "Enables the webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:allow-webview-size" + }, + { + "description": "Denies the clear_all_browsing_data command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-clear-all-browsing-data" + }, + { + "description": "Denies the create_webview command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-create-webview" + }, + { + "description": "Denies the create_webview_window command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-create-webview-window" + }, + { + "description": "Denies the get_all_webviews command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-get-all-webviews" + }, + { + "description": "Denies the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-internal-toggle-devtools" + }, + { + "description": "Denies the print command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-print" + }, + { + "description": "Denies the reparent command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-reparent" + }, + { + "description": "Denies the set_webview_focus command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-focus" + }, + { + "description": "Denies the set_webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-position" + }, + { + "description": "Denies the set_webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-size" + }, + { + "description": "Denies the set_webview_zoom command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-set-webview-zoom" + }, + { + "description": "Denies the webview_close command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-close" + }, + { + "description": "Denies the webview_hide command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-hide" + }, + { + "description": "Denies the webview_position command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-position" + }, + { + "description": "Denies the webview_show command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-show" + }, + { + "description": "Denies the webview_size command without any pre-configured scope.", + "type": "string", + "const": "core:webview:deny-webview-size" + }, + { + "description": "Default permissions for the plugin.", + "type": "string", + "const": "core:window:default" + }, + { + "description": "Enables the available_monitors command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-available-monitors" + }, + { + "description": "Enables the center command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-center" + }, + { + "description": "Enables the close command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-close" + }, + { + "description": "Enables the create command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-create" + }, + { + "description": "Enables the current_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-current-monitor" + }, + { + "description": "Enables the cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-cursor-position" + }, + { + "description": "Enables the destroy command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-destroy" + }, + { + "description": "Enables the get_all_windows command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-get-all-windows" + }, + { + "description": "Enables the hide command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-hide" + }, + { + "description": "Enables the inner_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-inner-position" + }, + { + "description": "Enables the inner_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-inner-size" + }, + { + "description": "Enables the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-internal-toggle-maximize" + }, + { + "description": "Enables the is_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-closable" + }, + { + "description": "Enables the is_decorated command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-decorated" + }, + { + "description": "Enables the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-enabled" + }, + { + "description": "Enables the is_focused command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-focused" + }, + { + "description": "Enables the is_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-fullscreen" + }, + { + "description": "Enables the is_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-maximizable" + }, + { + "description": "Enables the is_maximized command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-maximized" + }, + { + "description": "Enables the is_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-minimizable" + }, + { + "description": "Enables the is_minimized command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-minimized" + }, + { + "description": "Enables the is_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-resizable" + }, + { + "description": "Enables the is_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-is-visible" + }, + { + "description": "Enables the maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-maximize" + }, + { + "description": "Enables the minimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-minimize" + }, + { + "description": "Enables the monitor_from_point command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-monitor-from-point" + }, + { + "description": "Enables the outer_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-outer-position" + }, + { + "description": "Enables the outer_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-outer-size" + }, + { + "description": "Enables the primary_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-primary-monitor" + }, + { + "description": "Enables the request_user_attention command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-request-user-attention" + }, + { + "description": "Enables the scale_factor command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-scale-factor" + }, + { + "description": "Enables the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-always-on-bottom" + }, + { + "description": "Enables the set_always_on_top command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-always-on-top" + }, + { + "description": "Enables the set_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-closable" + }, + { + "description": "Enables the set_content_protected command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-content-protected" + }, + { + "description": "Enables the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-grab" + }, + { + "description": "Enables the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-icon" + }, + { + "description": "Enables the set_cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-position" + }, + { + "description": "Enables the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-cursor-visible" + }, + { + "description": "Enables the set_decorations command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-decorations" + }, + { + "description": "Enables the set_effects command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-effects" + }, + { + "description": "Enables the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-enabled" + }, + { + "description": "Enables the set_focus command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-focus" + }, + { + "description": "Enables the set_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-fullscreen" + }, + { + "description": "Enables the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-icon" + }, + { + "description": "Enables the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-ignore-cursor-events" + }, + { + "description": "Enables the set_max_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-max-size" + }, + { + "description": "Enables the set_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-maximizable" + }, + { + "description": "Enables the set_min_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-min-size" + }, + { + "description": "Enables the set_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-minimizable" + }, + { + "description": "Enables the set_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-position" + }, + { + "description": "Enables the set_progress_bar command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-progress-bar" + }, + { + "description": "Enables the set_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-resizable" + }, + { + "description": "Enables the set_shadow command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-shadow" + }, + { + "description": "Enables the set_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-size" + }, + { + "description": "Enables the set_size_constraints command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-size-constraints" + }, + { + "description": "Enables the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-skip-taskbar" + }, + { + "description": "Enables the set_theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-theme" + }, + { + "description": "Enables the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-title" + }, + { + "description": "Enables the set_title_bar_style command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-title-bar-style" + }, + { + "description": "Enables the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-set-visible-on-all-workspaces" + }, + { + "description": "Enables the show command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-show" + }, + { + "description": "Enables the start_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-start-dragging" + }, + { + "description": "Enables the start_resize_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-start-resize-dragging" + }, + { + "description": "Enables the theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-theme" + }, + { + "description": "Enables the title command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-title" + }, + { + "description": "Enables the toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-toggle-maximize" + }, + { + "description": "Enables the unmaximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-unmaximize" + }, + { + "description": "Enables the unminimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:allow-unminimize" + }, + { + "description": "Denies the available_monitors command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-available-monitors" + }, + { + "description": "Denies the center command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-center" + }, + { + "description": "Denies the close command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-close" + }, + { + "description": "Denies the create command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-create" + }, + { + "description": "Denies the current_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-current-monitor" + }, + { + "description": "Denies the cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-cursor-position" + }, + { + "description": "Denies the destroy command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-destroy" + }, + { + "description": "Denies the get_all_windows command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-get-all-windows" + }, + { + "description": "Denies the hide command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-hide" + }, + { + "description": "Denies the inner_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-inner-position" + }, + { + "description": "Denies the inner_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-inner-size" + }, + { + "description": "Denies the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-internal-toggle-maximize" + }, + { + "description": "Denies the is_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-closable" + }, + { + "description": "Denies the is_decorated command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-decorated" + }, + { + "description": "Denies the is_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-enabled" + }, + { + "description": "Denies the is_focused command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-focused" + }, + { + "description": "Denies the is_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-fullscreen" + }, + { + "description": "Denies the is_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-maximizable" + }, + { + "description": "Denies the is_maximized command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-maximized" + }, + { + "description": "Denies the is_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-minimizable" + }, + { + "description": "Denies the is_minimized command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-minimized" + }, + { + "description": "Denies the is_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-resizable" + }, + { + "description": "Denies the is_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-is-visible" + }, + { + "description": "Denies the maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-maximize" + }, + { + "description": "Denies the minimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-minimize" + }, + { + "description": "Denies the monitor_from_point command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-monitor-from-point" + }, + { + "description": "Denies the outer_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-outer-position" + }, + { + "description": "Denies the outer_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-outer-size" + }, + { + "description": "Denies the primary_monitor command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-primary-monitor" + }, + { + "description": "Denies the request_user_attention command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-request-user-attention" + }, + { + "description": "Denies the scale_factor command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-scale-factor" + }, + { + "description": "Denies the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-always-on-bottom" + }, + { + "description": "Denies the set_always_on_top command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-always-on-top" + }, + { + "description": "Denies the set_closable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-closable" + }, + { + "description": "Denies the set_content_protected command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-content-protected" + }, + { + "description": "Denies the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-grab" + }, + { + "description": "Denies the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-icon" + }, + { + "description": "Denies the set_cursor_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-position" + }, + { + "description": "Denies the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-cursor-visible" + }, + { + "description": "Denies the set_decorations command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-decorations" + }, + { + "description": "Denies the set_effects command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-effects" + }, + { + "description": "Denies the set_enabled command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-enabled" + }, + { + "description": "Denies the set_focus command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-focus" + }, + { + "description": "Denies the set_fullscreen command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-fullscreen" + }, + { + "description": "Denies the set_icon command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-icon" + }, + { + "description": "Denies the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-ignore-cursor-events" + }, + { + "description": "Denies the set_max_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-max-size" + }, + { + "description": "Denies the set_maximizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-maximizable" + }, + { + "description": "Denies the set_min_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-min-size" + }, + { + "description": "Denies the set_minimizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-minimizable" + }, + { + "description": "Denies the set_position command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-position" + }, + { + "description": "Denies the set_progress_bar command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-progress-bar" + }, + { + "description": "Denies the set_resizable command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-resizable" + }, + { + "description": "Denies the set_shadow command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-shadow" + }, + { + "description": "Denies the set_size command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-size" + }, + { + "description": "Denies the set_size_constraints command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-size-constraints" + }, + { + "description": "Denies the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-skip-taskbar" + }, + { + "description": "Denies the set_theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-theme" + }, + { + "description": "Denies the set_title command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-title" + }, + { + "description": "Denies the set_title_bar_style command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-title-bar-style" + }, + { + "description": "Denies the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-set-visible-on-all-workspaces" + }, + { + "description": "Denies the show command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-show" + }, + { + "description": "Denies the start_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-start-dragging" + }, + { + "description": "Denies the start_resize_dragging command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-start-resize-dragging" + }, + { + "description": "Denies the theme command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-theme" + }, + { + "description": "Denies the title command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-title" + }, + { + "description": "Denies the toggle_maximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-toggle-maximize" + }, + { + "description": "Denies the unmaximize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-unmaximize" + }, + { + "description": "Denies the unminimize command without any pre-configured scope.", + "type": "string", + "const": "core:window:deny-unminimize" + }, + { + "description": "Allows reading the opened deep link via the get_current command", + "type": "string", + "const": "deep-link:default" + }, + { + "description": "Enables the get_current command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-get-current" + }, + { + "description": "Enables the is_registered command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-is-registered" + }, + { + "description": "Enables the register command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-register" + }, + { + "description": "Enables the unregister command without any pre-configured scope.", + "type": "string", + "const": "deep-link:allow-unregister" + }, + { + "description": "Denies the get_current command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-get-current" + }, + { + "description": "Denies the is_registered command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-is-registered" + }, + { + "description": "Denies the register command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-register" + }, + { + "description": "Denies the unregister command without any pre-configured scope.", + "type": "string", + "const": "deep-link:deny-unregister" + }, + { + "description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n", + "type": "string", + "const": "dialog:default" + }, + { + "description": "Enables the ask command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-ask" + }, + { + "description": "Enables the confirm command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-confirm" + }, + { + "description": "Enables the message command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-message" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-open" + }, + { + "description": "Enables the save command without any pre-configured scope.", + "type": "string", + "const": "dialog:allow-save" + }, + { + "description": "Denies the ask command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-ask" + }, + { + "description": "Denies the confirm command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-confirm" + }, + { + "description": "Denies the message command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-message" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-open" + }, + { + "description": "Denies the save command without any pre-configured scope.", + "type": "string", + "const": "dialog:deny-save" + }, + { + "description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "const": "fs:default" + }, + { + "description": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta" + }, + { + "description": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.", + "type": "string", + "const": "fs:allow-app-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the application folders.", + "type": "string", + "const": "fs:allow-app-read" + }, + { + "description": "This allows full recursive read access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-read-recursive" + }, + { + "description": "This allows non-recursive write access to the application folders.", + "type": "string", + "const": "fs:allow-app-write" + }, + { + "description": "This allows full recursive write access to the complete application folders, files and subdirectories.", + "type": "string", + "const": "fs:allow-app-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appcache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "const": "fs:allow-appcache-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appcache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appconfig-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:allow-appconfig-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appconfig-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-appdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "const": "fs:allow-appdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-appdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applocaldata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:allow-applocaldata-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applocaldata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-applog-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-read" + }, + { + "description": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "const": "fs:allow-applog-write" + }, + { + "description": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-applog-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-audio-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-read" + }, + { + "description": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "const": "fs:allow-audio-write" + }, + { + "description": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-audio-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-cache-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-read" + }, + { + "description": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "const": "fs:allow-cache-write" + }, + { + "description": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-cache-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-config-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-read" + }, + { + "description": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "const": "fs:allow-config-write" + }, + { + "description": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-config-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-data-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-read" + }, + { + "description": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "const": "fs:allow-data-write" + }, + { + "description": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-data-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-desktop-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-read" + }, + { + "description": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "const": "fs:allow-desktop-write" + }, + { + "description": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-desktop-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-document-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:allow-document-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-document-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-download-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-read" + }, + { + "description": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:allow-download-write" + }, + { + "description": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-download-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-exe-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-read" + }, + { + "description": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "const": "fs:allow-exe-write" + }, + { + "description": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-exe-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-font-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-read" + }, + { + "description": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "const": "fs:allow-font-write" + }, + { + "description": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-font-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-home-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-read" + }, + { + "description": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "const": "fs:allow-home-write" + }, + { + "description": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-home-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-localdata-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:allow-localdata-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-localdata-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-log-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-read" + }, + { + "description": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "const": "fs:allow-log-write" + }, + { + "description": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-log-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-picture-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-read" + }, + { + "description": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "const": "fs:allow-picture-write" + }, + { + "description": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-picture-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-public-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-read" + }, + { + "description": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "const": "fs:allow-public-write" + }, + { + "description": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-public-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-resource-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-read" + }, + { + "description": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "const": "fs:allow-resource-write" + }, + { + "description": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-resource-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-runtime-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-read" + }, + { + "description": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "const": "fs:allow-runtime-write" + }, + { + "description": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-runtime-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-temp-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "const": "fs:allow-temp-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-temp-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-template-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-read" + }, + { + "description": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:allow-template-write" + }, + { + "description": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-template-write-recursive" + }, + { + "description": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta" + }, + { + "description": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "const": "fs:allow-video-meta-recursive" + }, + { + "description": "This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-read" + }, + { + "description": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-read-recursive" + }, + { + "description": "This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "const": "fs:allow-video-write" + }, + { + "description": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "const": "fs:allow-video-write-recursive" + }, + { + "description": "This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "const": "fs:deny-default" + }, + { + "description": "Enables the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-copy-file" + }, + { + "description": "Enables the create command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-create" + }, + { + "description": "Enables the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-exists" + }, + { + "description": "Enables the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-fstat" + }, + { + "description": "Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-ftruncate" + }, + { + "description": "Enables the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-lstat" + }, + { + "description": "Enables the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-mkdir" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-open" + }, + { + "description": "Enables the read command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read" + }, + { + "description": "Enables the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-dir" + }, + { + "description": "Enables the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-file" + }, + { + "description": "Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file" + }, + { + "description": "Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines" + }, + { + "description": "Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-read-text-file-lines-next" + }, + { + "description": "Enables the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-remove" + }, + { + "description": "Enables the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-rename" + }, + { + "description": "Enables the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-seek" + }, + { + "description": "Enables the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-stat" + }, + { + "description": "Enables the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-truncate" + }, + { + "description": "Enables the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-unwatch" + }, + { + "description": "Enables the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-watch" + }, + { + "description": "Enables the write command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write" + }, + { + "description": "Enables the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-file" + }, + { + "description": "Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:allow-write-text-file" + }, + { + "description": "This permissions allows to create the application specific directories.\n", + "type": "string", + "const": "fs:create-app-specific-dirs" + }, + { + "description": "Denies the copy_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-copy-file" + }, + { + "description": "Denies the create command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-create" + }, + { + "description": "Denies the exists command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-exists" + }, + { + "description": "Denies the fstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-fstat" + }, + { + "description": "Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-ftruncate" + }, + { + "description": "Denies the lstat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-lstat" + }, + { + "description": "Denies the mkdir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-mkdir" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-open" + }, + { + "description": "Denies the read command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read" + }, + { + "description": "Denies the read_dir command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-dir" + }, + { + "description": "Denies the read_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-file" + }, + { + "description": "Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file" + }, + { + "description": "Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines" + }, + { + "description": "Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-read-text-file-lines-next" + }, + { + "description": "Denies the remove command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-remove" + }, + { + "description": "Denies the rename command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-rename" + }, + { + "description": "Denies the seek command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-seek" + }, + { + "description": "Denies the stat command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-stat" + }, + { + "description": "Denies the truncate command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-truncate" + }, + { + "description": "Denies the unwatch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-unwatch" + }, + { + "description": "Denies the watch command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-watch" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-linux" + }, + { + "description": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "const": "fs:deny-webview-data-windows" + }, + { + "description": "Denies the write command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write" + }, + { + "description": "Denies the write_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-file" + }, + { + "description": "Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "const": "fs:deny-write-text-file" + }, + { + "description": "This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-all" + }, + { + "description": "This permission allows recursive read functionality on the application\nspecific base directories. \n", + "type": "string", + "const": "fs:read-app-specific-dirs-recursive" + }, + { + "description": "This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-dirs" + }, + { + "description": "This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-files" + }, + { + "description": "This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:read-meta" + }, + { + "description": "An empty permission you can use to modify the global scope.", + "type": "string", + "const": "fs:scope" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the application folders.", + "type": "string", + "const": "fs:scope-app" + }, + { + "description": "This scope permits to list all files and folders in the application directories.", + "type": "string", + "const": "fs:scope-app-index" + }, + { + "description": "This scope permits recursive access to the complete application folders, including sub directories and files.", + "type": "string", + "const": "fs:scope-app-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", + "type": "string", + "const": "fs:scope-appcache" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "const": "fs:scope-appcache-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appcache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", + "type": "string", + "const": "fs:scope-appconfig" + }, + { + "description": "This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "const": "fs:scope-appconfig-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appconfig-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", + "type": "string", + "const": "fs:scope-appdata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "const": "fs:scope-appdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-appdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", + "type": "string", + "const": "fs:scope-applocaldata" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "const": "fs:scope-applocaldata-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applocaldata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", + "type": "string", + "const": "fs:scope-applog" + }, + { + "description": "This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "const": "fs:scope-applog-index" + }, + { + "description": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-applog-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", + "type": "string", + "const": "fs:scope-audio" + }, + { + "description": "This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "const": "fs:scope-audio-index" + }, + { + "description": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-audio-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", + "type": "string", + "const": "fs:scope-cache" + }, + { + "description": "This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "const": "fs:scope-cache-index" + }, + { + "description": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-cache-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", + "type": "string", + "const": "fs:scope-config" + }, + { + "description": "This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "const": "fs:scope-config-index" + }, + { + "description": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-config-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DATA` folder.", + "type": "string", + "const": "fs:scope-data" + }, + { + "description": "This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "const": "fs:scope-data-index" + }, + { + "description": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-data-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", + "type": "string", + "const": "fs:scope-desktop" + }, + { + "description": "This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "const": "fs:scope-desktop-index" + }, + { + "description": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-desktop-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", + "type": "string", + "const": "fs:scope-document" + }, + { + "description": "This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "const": "fs:scope-document-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-document-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", + "type": "string", + "const": "fs:scope-download" + }, + { + "description": "This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "const": "fs:scope-download-index" + }, + { + "description": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-download-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$EXE` folder.", + "type": "string", + "const": "fs:scope-exe" + }, + { + "description": "This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "const": "fs:scope-exe-index" + }, + { + "description": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-exe-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$FONT` folder.", + "type": "string", + "const": "fs:scope-font" + }, + { + "description": "This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "const": "fs:scope-font-index" + }, + { + "description": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-font-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$HOME` folder.", + "type": "string", + "const": "fs:scope-home" + }, + { + "description": "This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "const": "fs:scope-home-index" + }, + { + "description": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-home-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", + "type": "string", + "const": "fs:scope-localdata" + }, + { + "description": "This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "const": "fs:scope-localdata-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-localdata-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$LOG` folder.", + "type": "string", + "const": "fs:scope-log" + }, + { + "description": "This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "const": "fs:scope-log-index" + }, + { + "description": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-log-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", + "type": "string", + "const": "fs:scope-picture" + }, + { + "description": "This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "const": "fs:scope-picture-index" + }, + { + "description": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-picture-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", + "type": "string", + "const": "fs:scope-public" + }, + { + "description": "This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "const": "fs:scope-public-index" + }, + { + "description": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-public-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", + "type": "string", + "const": "fs:scope-resource" + }, + { + "description": "This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "const": "fs:scope-resource-index" + }, + { + "description": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-resource-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", + "type": "string", + "const": "fs:scope-runtime" + }, + { + "description": "This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "const": "fs:scope-runtime-index" + }, + { + "description": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-runtime-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", + "type": "string", + "const": "fs:scope-temp" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "const": "fs:scope-temp-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-temp-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", + "type": "string", + "const": "fs:scope-template" + }, + { + "description": "This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "const": "fs:scope-template-index" + }, + { + "description": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-template-recursive" + }, + { + "description": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", + "type": "string", + "const": "fs:scope-video" + }, + { + "description": "This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "const": "fs:scope-video-index" + }, + { + "description": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "const": "fs:scope-video-recursive" + }, + { + "description": "This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-all" + }, + { + "description": "This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "const": "fs:write-files" + }, + { + "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n", + "type": "string", + "const": "http:default" + }, + { + "description": "Enables the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch" + }, + { + "description": "Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-cancel" + }, + { + "description": "Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-read-body" + }, + { + "description": "Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:allow-fetch-send" + }, + { + "description": "Denies the fetch command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch" + }, + { + "description": "Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-cancel" + }, + { + "description": "Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-read-body" + }, + { + "description": "Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "const": "http:deny-fetch-send" + }, + { + "description": "This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n", + "type": "string", + "const": "os:default" + }, + { + "description": "Enables the arch command without any pre-configured scope.", + "type": "string", + "const": "os:allow-arch" + }, + { + "description": "Enables the exe_extension command without any pre-configured scope.", + "type": "string", + "const": "os:allow-exe-extension" + }, + { + "description": "Enables the family command without any pre-configured scope.", + "type": "string", + "const": "os:allow-family" + }, + { + "description": "Enables the hostname command without any pre-configured scope.", + "type": "string", + "const": "os:allow-hostname" + }, + { + "description": "Enables the locale command without any pre-configured scope.", + "type": "string", + "const": "os:allow-locale" + }, + { + "description": "Enables the os_type command without any pre-configured scope.", + "type": "string", + "const": "os:allow-os-type" + }, + { + "description": "Enables the platform command without any pre-configured scope.", + "type": "string", + "const": "os:allow-platform" + }, + { + "description": "Enables the version command without any pre-configured scope.", + "type": "string", + "const": "os:allow-version" + }, + { + "description": "Denies the arch command without any pre-configured scope.", + "type": "string", + "const": "os:deny-arch" + }, + { + "description": "Denies the exe_extension command without any pre-configured scope.", + "type": "string", + "const": "os:deny-exe-extension" + }, + { + "description": "Denies the family command without any pre-configured scope.", + "type": "string", + "const": "os:deny-family" + }, + { + "description": "Denies the hostname command without any pre-configured scope.", + "type": "string", + "const": "os:deny-hostname" + }, + { + "description": "Denies the locale command without any pre-configured scope.", + "type": "string", + "const": "os:deny-locale" + }, + { + "description": "Denies the os_type command without any pre-configured scope.", + "type": "string", + "const": "os:deny-os-type" + }, + { + "description": "Denies the platform command without any pre-configured scope.", + "type": "string", + "const": "os:deny-platform" + }, + { + "description": "Denies the version command without any pre-configured scope.", + "type": "string", + "const": "os:deny-version" + }, + { + "description": "This permission set configures which\nprocess feeatures are by default exposed.\n\n#### Granted Permissions\n\nThis enables to quit via `allow-exit` and restart via `allow-restart`\nthe application.\n", + "type": "string", + "const": "process:default" + }, + { + "description": "Enables the exit command without any pre-configured scope.", + "type": "string", + "const": "process:allow-exit" + }, + { + "description": "Enables the restart command without any pre-configured scope.", + "type": "string", + "const": "process:allow-restart" + }, + { + "description": "Denies the exit command without any pre-configured scope.", + "type": "string", + "const": "process:deny-exit" + }, + { + "description": "Denies the restart command without any pre-configured scope.", + "type": "string", + "const": "process:deny-restart" + }, + { + "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality without any specific\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n", + "type": "string", + "const": "shell:default" + }, + { + "description": "Enables the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-execute" + }, + { + "description": "Enables the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-kill" + }, + { + "description": "Enables the open command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-open" + }, + { + "description": "Enables the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-spawn" + }, + { + "description": "Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:allow-stdin-write" + }, + { + "description": "Denies the execute command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-execute" + }, + { + "description": "Denies the kill command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-kill" + }, + { + "description": "Denies the open command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-open" + }, + { + "description": "Denies the spawn command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-spawn" + }, + { + "description": "Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "const": "shell:deny-stdin-write" + }, + { + "description": "This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n", + "type": "string", + "const": "updater:default" + }, + { + "description": "Enables the check command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-check" + }, + { + "description": "Enables the download command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-download" + }, + { + "description": "Enables the download_and_install command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-download-and-install" + }, + { + "description": "Enables the install command without any pre-configured scope.", + "type": "string", + "const": "updater:allow-install" + }, + { + "description": "Denies the check command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-check" + }, + { + "description": "Denies the download command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-download" + }, + { + "description": "Denies the download_and_install command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-download-and-install" + }, + { + "description": "Denies the install command without any pre-configured scope.", + "type": "string", + "const": "updater:deny-install" + } + ] + }, + "Value": { + "description": "All supported ACL values.", + "anyOf": [ + { + "description": "Represents a null JSON value.", + "type": "null" + }, + { + "description": "Represents a [`bool`].", + "type": "boolean" + }, + { + "description": "Represents a valid ACL [`Number`].", + "allOf": [ + { + "$ref": "#/definitions/Number" + } + ] + }, + { + "description": "Represents a [`String`].", + "type": "string" + }, + { + "description": "Represents a list of other [`Value`]s.", + "type": "array", + "items": { + "$ref": "#/definitions/Value" + } + }, + { + "description": "Represents a map of [`String`] keys to [`Value`]s.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Value" + } + } + ] + }, + "Number": { + "description": "A valid ACL number.", + "anyOf": [ + { + "description": "Represents an [`i64`].", + "type": "integer", + "format": "int64" + }, + { + "description": "Represents a [`f64`].", + "type": "number", + "format": "double" + } + ] + }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, + "ShellScopeEntryAllowedArg": { + "description": "A command argument allowed to be executed by the webview API.", + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "description": "A variable that is set while calling the command from the webview API.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "raw": { + "description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.", + "default": false, + "type": "boolean" + }, + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "ShellScopeEntryAllowedArgs": { + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/ShellScopeEntryAllowedArg" + } + } + ] + } + } +} \ No newline at end of file diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 40d8ab74..1ff516aa 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,31 +1,24 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] - #[tauri::command] fn greet(name: &str) -> String { format!("Hello, {}! You've been greeted from Rust!", name) } -use serde_json::Value; -use reqwest::header::{HeaderMap, HeaderName, HeaderValue}; use base64::{engine::general_purpose, Engine as _}; -use tauri::Manager; -use tauri::State; -use std::io::Write; -use std::sync::Mutex; -use std::{time::Duration, path::Path}; +use reqwest::header::{HeaderMap, HeaderName, HeaderValue}; use serde_json::json; +use serde_json::Value; use std::collections::HashMap; -use actix_cors::Cors; -use tauri::api::path::app_data_dir; -use actix_web::{web, HttpRequest, HttpResponse, HttpServer, Responder, App, post}; -use std::fs::File; -struct HttpSecret(Mutex); -struct HttpPort(Mutex); +use std::io::Write; +use std::{path::Path, time::Duration}; +use tauri::path::BaseDirectory; +use tauri::Manager; +use tauri::{AppHandle, Emitter}; #[tauri::command] -async fn native_request(url: String, body: String, header: String, method:String) -> String { +async fn native_request(url: String, body: String, header: String, method: String) -> String { let headers_json: Value = match serde_json::from_str(&header) { Ok(h) => h, Err(e) => return format!(r#"{{"success":false,"body":"{}"}}"#, e.to_string()), @@ -50,24 +43,23 @@ async fn native_request(url: String, body: String, header: String, method:String } let client = reqwest::Client::new(); - let response:Result; + let response: Result; if method == "POST" { response = client - .post(&url) - .headers(headers) - .timeout(Duration::from_secs(120)) - .body(body) - .send() - .await; - } - else{ + .post(&url) + .headers(headers) + .timeout(Duration::from_secs(120)) + .body(body) + .send() + .await; + } else { response = client - .get(&url) - .headers(headers) - .timeout(Duration::from_secs(120)) - .send() - .await; + .get(&url) + .headers(headers) + .timeout(Duration::from_secs(120)) + .send() + .await; } match response { @@ -80,14 +72,17 @@ async fn native_request(url: String, body: String, header: String, method:String }; let encoded = general_purpose::STANDARD.encode(&bytes); - format!(r#"{{"success":true,"body":"{}","headers":{}}}"#, encoded, header_json) + format!( + r#"{{"success":true,"body":"{}","headers":{}}}"#, + encoded, header_json + ) } Err(e) => format!(r#"{{"success":false,"body":"{}"}}"#, e.to_string()), } } #[tauri::command] -fn check_auth(fpath: String, auth: String) -> bool{ +fn check_auth(fpath: String, auth: String) -> bool { //check file exists let path = Path::new(&fpath); if !path.exists() { @@ -109,8 +104,6 @@ fn check_auth(fpath: String, auth: String) -> bool{ println!("File {} is too large", path.display()); return false; } - - // read file, return false when error let got_auth = std::fs::read_to_string(&path); @@ -119,8 +112,7 @@ fn check_auth(fpath: String, auth: String) -> bool{ if got_auth.is_err() { println!("Error reading file {}", path.display()); return false; - } - else{ + } else { // check auth if got_auth.unwrap() != auth { println!("Auth does not match"); @@ -129,11 +121,10 @@ fn check_auth(fpath: String, auth: String) -> bool{ println!("Auth matches"); return true; } - } #[tauri::command] -async fn install_python(path:String) -> bool{ +async fn install_python(path: String) -> bool { //get python embeddable depending on os let os = std::env::consts::OS; let url; @@ -142,12 +133,11 @@ async fn install_python(path:String) -> bool{ std::fs::create_dir_all(&py_path).unwrap(); } let zip_path: std::path::PathBuf = Path::new(&path).join("python.zip"); - + println!("Path: {}", path); if os == "windows" { url = "https://www.python.org/ftp/python/3.11.7/python-3.11.7-embed-amd64.zip".to_string() - } - else{ + } else { println!("OS not supported"); return false; } @@ -168,16 +158,13 @@ async fn install_python(path:String) -> bool{ if os == "windows" { let mut zipf = ZipArchive::new(std::fs::File::open(&zip_path).unwrap()).unwrap(); zipf.extract(&py_path).unwrap(); - } - else if os == "linux" { + } else if os == "linux" { let mut tarf = tar::Archive::new(std::fs::File::open(&zip_path).unwrap()); tarf.unpack(&py_path).unwrap(); - } - else if os == "macos" { + } else if os == "macos" { let mut zipf = zip::ZipArchive::new(std::fs::File::open(&zip_path).unwrap()).unwrap(); zipf.extract(&py_path).unwrap(); - } - else{ + } else { println!("OS not supported"); return false; } @@ -191,20 +178,20 @@ async fn install_python(path:String) -> bool{ Ok(o) => { let res = String::from_utf8(o.stdout).unwrap(); if !res.starts_with("Python ") { - return false + return false; } println!("{}", res); - return true - }, + return true; + } Err(e) => { println!("{}", e); - return false + return false; } } } #[tauri::command] -async fn install_pip(path:String) -> bool{ +async fn install_pip(path: String) -> bool { let py_path = Path::new(&path).join("python"); let py_exec_path = py_path.join("python.exe"); let get_pip_url = "https://bootstrap.pypa.io/get-pip.py"; @@ -224,34 +211,34 @@ async fn install_pip(path:String) -> bool{ let res = String::from_utf8(o.stdout).unwrap(); println!("{}", res); if !res.starts_with("Python ") { - return false + return false; } - return true - }, + return true; + } Err(e) => { println!("{}", e); - return false + return false; } - } + } } use std::process::Command; #[tauri::command] -fn check_requirements_local() -> String{ +fn check_requirements_local() -> String { let mut py = Command::new("python"); let output = py.arg("--version").output(); match output { Ok(o) => { let res = String::from_utf8(o.stdout).unwrap(); if !res.starts_with("Python ") { - return "Python is not installed".to_string() + return "Python is not installed".to_string(); } println!("{}", res); - }, + } Err(e) => { println!("{}", e); - return "Python is not installed, or not loadable".to_string() + return "Python is not installed, or not loadable".to_string(); } } @@ -261,21 +248,21 @@ fn check_requirements_local() -> String{ Ok(o) => { let res = String::from_utf8(o.stdout).unwrap(); if !res.starts_with("git version ") { - return "Git is not installed".to_string() + return "Git is not installed".to_string(); } println!("{}", res); - }, + } Err(e) => { println!("{}", e); - return "Git is not installed, or not loadable".to_string() + return "Git is not installed, or not loadable".to_string(); } } - return "success".to_string() + return "success".to_string(); } #[tauri::command] -fn post_py_install(path:String){ +fn post_py_install(path: String) { let py_path = Path::new(&path).join("python"); let py_pth_path = py_path.join("python311._pth"); //uncomment python libs @@ -288,31 +275,38 @@ fn post_py_install(path:String){ std::fs::write(&completed_path, "python311").unwrap(); } - #[tauri::command] -fn install_py_dependencies(path:String, dependency:String) -> Result<(), String>{ +fn install_py_dependencies(path: String, dependency: String) -> Result<(), String> { println!("installing {}", dependency); let py_path = Path::new(&path).join("python"); let py_exec_path = py_path.join("python.exe"); let mut py = Command::new(py_exec_path); - let output = py.arg("-m").arg("pip").arg("install").arg(dependency).output(); + let output = py + .arg("-m") + .arg("pip") + .arg("install") + .arg(dependency) + .output(); match output { Ok(o) => { let res = String::from_utf8(o.stdout).unwrap(); println!("{}", res); - return Ok(()) - }, + return Ok(()); + } Err(e) => { println!("{}", e); - return Err(e.to_string()) + return Err(e.to_string()); } } } #[tauri::command] -fn run_py_server(handle: tauri::AppHandle, py_path:String){ +fn run_py_server(handle: tauri::AppHandle, py_path: String) { let py_exec_path = Path::new(&py_path).join("python").join("python.exe"); - let server_path = handle.path_resolver().resolve_resource("src-python/run.py").expect("failed to resolve resource"); + let server_path = handle + .path() + .resolve("src-python/run.py", BaseDirectory::Resource) + .expect("failed to resolve resource"); let mut py_server = Command::new(&py_exec_path); //set working directory to server path @@ -320,78 +314,32 @@ fn run_py_server(handle: tauri::AppHandle, py_path:String){ println!("server_path: {}", server_path.display()); println!("py_exec_path: {}", py_exec_path.display()); - let mut _child = py_server.arg("-m").arg("uvicorn").arg("--port").arg("10026").arg("main:app").spawn().expect("failed to execute process"); + let mut _child = py_server + .arg("-m") + .arg("uvicorn") + .arg("--port") + .arg("10026") + .arg("main:app") + .spawn() + .expect("failed to execute process"); println!("server started"); - return + return; } #[tauri::command] -fn run_server_local(){ - let app_base_path = tauri::api::path::data_dir().unwrap().join("co.aiclient.risu"); - - //check app base path exists - if !app_base_path.exists() { - std::fs::create_dir_all(&app_base_path).unwrap(); - } - - let server_path = app_base_path.clone().join("local_server"); - - //check server path exists - if !&server_path.exists() { - //git clone server - let mut git = Command::new("git"); - let output = git - .current_dir(&app_base_path.clone()) - .arg("clone") - .arg("https://github.com/kwaroran/risu-exllama-connector.git") - .output(); - match output { - Ok(o) => { - let res = String::from_utf8(o.stdout).unwrap(); - println!("output: {}", res); - }, - Err(e) => { - println!("{}", e); - return - } - } - - println!("cloned"); - - let git_cloned_path = app_base_path.clone().join("risu-exllama-connector"); - - println!("git_cloned_path: {}", git_cloned_path.display()); - //rename folder to local_server - std::fs::rename(git_cloned_path, server_path.clone()).unwrap(); - } - - - //check os is windows - if cfg!(target_os = "windows") { - println!("windows runner"); - let command_location = &server_path.clone().join("run.cmd"); - let mut server = Command::new(command_location); - let mut _child = server.current_dir(server_path).spawn().expect("failed to execute process"); - } - else{ - println!("linux/mac runner"); - let command_location = &server_path.clone().join("run.sh"); - let mut server = Command::new(command_location); - let mut _child = server.current_dir(server_path).spawn().expect("failed to execute process"); - } - return - -} - -#[tauri::command] -async fn streamed_fetch(id:String, url:String, headers: String, body: String, handle: tauri::AppHandle) -> String { +async fn streamed_fetch( + id: String, + url: String, + headers: String, + body: String, + app: AppHandle, +) -> String { //parse headers let headers_json: Value = match serde_json::from_str(&headers) { Ok(h) => h, Err(e) => return format!(r#"{{"success":false, body:{}}}"#, e.to_string()), }; - let app = handle.app_handle(); - + let mut headers = HeaderMap::new(); if let Some(obj) = headers_json.as_object() { for (key, value) in obj { @@ -415,13 +363,23 @@ async fn streamed_fetch(id:String, url:String, headers: String, body: String, ha .headers(headers) .timeout(Duration::from_secs(240)) .body(body) - .send().await; + .send() + .await; match response { Ok(mut resp) => { let headers = resp.headers(); let header_json = header_map_to_json(headers); - app.emit_all("streamed_fetch", &format!(r#"{{"type": "headers", "body": {}, "id": "{}", "status": {}}}"#, header_json, id, resp.status().as_u16())).unwrap(); + app.emit( + "streamed_fetch", + &format!( + r#"{{"type": "headers", "body": {}, "id": "{}", "status": {}}}"#, + header_json, + id, + resp.status().as_u16() + ), + ) + .unwrap(); loop { let byt = resp.chunk().await; match byt { @@ -431,140 +389,81 @@ async fn streamed_fetch(id:String, url:String, headers: String, body: String, ha } let chunk = chunk.unwrap(); let encoded = general_purpose::STANDARD.encode(chunk); - let emited = app.emit_all("streamed_fetch", &format!(r#"{{"type": "chunk", "body": "{}", "id": "{}"}}"#, encoded, id)); + let emited = app.emit( + "streamed_fetch", + &format!( + r#"{{"type": "chunk", "body": "{}", "id": "{}"}}"#, + encoded, id + ), + ); match emited { - Ok(_) => {}, + Ok(_) => {} Err(e) => { return format!(r#"{{"success":false, body:{}}}"#, e.to_string()) } } } - Err(e) => { - return format!(r#"{{"success":false, body:{}}}"#, e.to_string()) - } + Err(e) => return format!(r#"{{"success":false, body:{}}}"#, e.to_string()), } } - app.emit_all("streamed_fetch", &format!(r#"{{"type": "end", "id": "{}"}}"#, id)).unwrap(); + app.emit( + "streamed_fetch", + &format!(r#"{{"type": "end", "id": "{}"}}"#, id), + ) + .unwrap(); return "{\"success\":true}".to_string(); } - Err(e) => { - return format!(r#"{{"success":false, body:{}}}"#, e.to_string()) - } + Err(e) => return format!(r#"{{"success":false, body:{}}}"#, e.to_string()), } } -#[tauri::command] -fn get_http_secret(secret_state: State) -> String { - secret_state.0.lock().unwrap().clone() -} - -#[tauri::command] -fn get_http_port(port_state: State) -> u16 { - port_state.0.lock().unwrap().clone() -} - -#[post("/")] -async fn write_binary_file_to_appdata(req: HttpRequest, body: web::Bytes, app_handle: web::Data, secret: web::Data) -> impl Responder { - let query = req.query_string(); - let headers = req.headers(); - let req_secret = headers.get("x-tauri-secret").unwrap().to_str().unwrap(); - if req_secret != *secret.as_ref() { - return HttpResponse::Unauthorized().body("Unauthorized"); - } - let params: std::collections::HashMap<_, _> = url::form_urlencoded::parse(query.as_bytes()).into_owned().collect(); - let app_data_dir = app_data_dir(&app_handle.config()).expect("App dir must be returned by tauri"); - if let Some(file_path) = params.get("path") { - let full_path = app_data_dir.join(file_path); - if let Some(parent) = Path::new(&full_path).parent() { - if let Err(e) = std::fs::create_dir_all(parent) { - return HttpResponse::InternalServerError().body(format!("Failed to create directories: {}", e)); - } - } - - match File::create(&full_path) { - Ok(mut file) => { - if let Err(e) = file.write_all(&body) { - return HttpResponse::InternalServerError().body(format!("Failed to write to file: {}", e)); - } - HttpResponse::Ok().body("File written successfully") - } - Err(e) => HttpResponse::InternalServerError().body(format!("Failed to create file: {}", e)), - } - } else { - HttpResponse::BadRequest().body("Missing file path in query string") - } -} - -async fn run_http_server(handle: tauri::AppHandle, secret: String) { - for port in 5354..65535 { - let handle_copy = handle.clone(); - let secret_copy = secret.clone(); - let res = HttpServer::new(move || { - App::new() - .wrap( - Cors::default() - .allow_any_origin() - .allow_any_method() - .allow_any_header() - .max_age(3600) - ) - .app_data(web::PayloadConfig::new(1024 * 1024 * 1024)) // 1 GB - .app_data(web::Data::new(handle_copy.clone())) - .app_data(web::Data::new(secret_copy.clone())) - .service(write_binary_file_to_appdata) - }) - .bind(("127.0.0.1", port)); - match res { - Ok(server) => { - handle.manage(HttpPort(Mutex::new(port))); - let _ = server.run().await; - break; - } - Err(e) => { - eprintln!("Failed to bind to port {}: {}", port, e); - } - } - } -} fn main() { - tauri::Builder::default() - .manage(HttpSecret(uuid::Uuid::new_v4().to_string().into())) + let mut builder = tauri::Builder::default(); + + #[cfg(desktop)] + { + builder = builder.plugin(tauri_plugin_single_instance::init(|app, args, cwd| { + let _ = app + .get_webview_window("main") + .expect("no main window") + .set_focus(); + })); + } + + builder + .plugin(tauri_plugin_http::init()) + .plugin(tauri_plugin_deep_link::init()) + .plugin(tauri_plugin_shell::init()) + .plugin(tauri_plugin_process::init()) + .plugin(tauri_plugin_updater::Builder::new().build()) + .plugin(tauri_plugin_dialog::init()) + .plugin(tauri_plugin_os::init()) + .plugin(tauri_plugin_fs::init()) .invoke_handler(tauri::generate_handler![ greet, native_request, check_auth, check_requirements_local, - run_server_local, install_python, install_pip, post_py_install, run_py_server, install_py_dependencies, streamed_fetch, - get_http_secret, - get_http_port ]) - .setup(|app| { - let handle = app.handle().clone(); - let secret_state: State = app.state(); - let secret = secret_state.0.lock().unwrap().clone(); - std::thread::spawn(move || { - let rt = actix_rt::Runtime::new().unwrap(); - rt.block_on(run_http_server(handle.clone(), secret.clone())); - }); - Ok(()) - }) .run(tauri::generate_context!()) - .expect("error while running tauri application"); + .expect("error while running tauri application") } - fn header_map_to_json(header_map: &HeaderMap) -> serde_json::Value { let mut map = HashMap::new(); for (key, value) in header_map { - map.insert(key.as_str().to_string(), value.to_str().unwrap().to_string()); + map.insert( + key.as_str().to_string(), + value.to_str().unwrap().to_string(), + ); } json!(map) } diff --git a/src-tauri/src/mainx.txt b/src-tauri/src/mainx.txt new file mode 100644 index 00000000..a76147bf --- /dev/null +++ b/src-tauri/src/mainx.txt @@ -0,0 +1,5 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +fn main() { + alib::run(); +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index ba8da883..a251bc72 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -2,108 +2,53 @@ "build": { "beforeDevCommand": "pnpm dev", "beforeBuildCommand": "pnpm build", - "devPath": "http://localhost:5174", - "distDir": "../dist", - "withGlobalTauri": false + "frontendDist": "../dist", + "devUrl": "http://localhost:5174" }, - "package": { - "productName": "RisuAI", - "version": "124.2.2" - }, - "tauri": { - "allowlist": { - "app": { - "all": true - }, - "process": { - "relaunch": true - }, - "protocol": { - "all": true, - "assetScope": ["asset","$APPDATA","$APPDATA/*","$APPDATA/**/*", "/data/**/*"] - }, - "all": false, - "shell": { - "all": false, - "open": true - }, - "fs":{ - "all": true, - "scope": ["$APPDATA","$APPDATA/*","$APPDATA/**/*", "$DOWNLOAD/*", "/data/**/*", "$RESOURCE/*"] - }, - "path":{ - "all": true - }, - "http": { - "all": true, - "request": true, - "scope": ["https://*/*", "https://*/**/*","http://*/*", "http://*/**/*"] - }, - "window": { - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": true, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": true, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMinSize": false, - "setPosition": false, - "setResizable": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - }, - "dialog": { - "all": true - }, - "os": { - "all": true + "bundle": { + "active": true, + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "resources": [ + "src-python/*" + ], + "targets": "all", + "createUpdaterArtifacts": "v1Compatible", + "fileAssociations": [ + { + "ext": [ + "risum", "risup", "charx" + ] } - }, - "bundle": { - "active": true, - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.icns", - "icons/icon.ico" - ], - "identifier": "co.aiclient.risu", - "targets": "all", - "resources": [ - "src-python/*" - ] - }, - "security": { - "csp": null - }, + ] + }, + "productName": "RisuAI", + "mainBinaryName": "RisuAI", + "version": "136.0.1", + "identifier": "co.aiclient.risu", + "plugins": { "updater": { - "active": true, - "endpoints": ["https://github.com/kwaroran/RisuAI/releases/latest/download/latest.json"], - "dialog": false, "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDU2ODMzOTIxMDMxOTY1MUYKUldRZlpSa0RJVG1EVmx5Vm1WYlhFM29HMEJrUTRrYmg5dDQ0RFpvdUphNDdxQmVlWXJHVmV5TEYK", + "endpoints": [ + "https://github.com/kwaroran/RisuAI/releases/latest/download/latest.json" + ], "windows": { "installMode": "passive" } }, + "deep-link": { + "desktop": { + "schemes": ["risuailocal"] + } + } + }, + "app": { + "withGlobalTauri": false, "windows": [ { "fullscreen": false, @@ -113,8 +58,21 @@ "height": 768, "minWidth": 300, "minHeight": 500, - "fileDropEnabled": false + "dragDropEnabled": false } - ] + ], + "security": { + "assetProtocol": { + "scope": [ + "asset", + "$APPDATA", + "$APPDATA/*", + "$APPDATA/**/*", + "/data/**/*" + ], + "enable": true + }, + "csp": null + } } -} +} \ No newline at end of file diff --git a/src/App.svelte b/src/App.svelte index 9efe1fb5..0b497740 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,6 +1,6 @@
@@ -202,20 +224,22 @@ {/if} - - + {#if !$ConnectionOpenStore} + + + {/if} {/if} {#if $DataBase.translator !== '' && !blankMessage} + + +
+{/if} +
+ {#if $MobileSideBar > 0} +
+ {#if $MobileSideBar === 1} + + {:else if $MobileSideBar === 2} + + {:else if $MobileSideBar === 3} + + {/if} +
+ {:else if $selectedCharID !== -1} + + {:else if $MobileGUIStack === 0} + + {:else if $MobileGUIStack === 1} + + {:else if $MobileGUIStack === 2} + + {/if} +
\ No newline at end of file diff --git a/src/lib/Mobile/MobileCharacters.svelte b/src/lib/Mobile/MobileCharacters.svelte new file mode 100644 index 00000000..ced66a86 --- /dev/null +++ b/src/lib/Mobile/MobileCharacters.svelte @@ -0,0 +1,82 @@ + +
+ {#each sortChar($DataBase.characters) as char, i} + {#if char.name.toLocaleLowerCase().includes($MobileSearch.toLocaleLowerCase())} + + {/if} + {/each} +
+ + \ No newline at end of file diff --git a/src/lib/Mobile/MobileFooter.svelte b/src/lib/Mobile/MobileFooter.svelte new file mode 100644 index 00000000..3ec34c57 --- /dev/null +++ b/src/lib/Mobile/MobileFooter.svelte @@ -0,0 +1,72 @@ + +{#if $selectedCharID === -1} + +
+ + + +
+ +{/if} + +{#if $selectedCharID !== -1 && $MobileSideBar === 2} +
+ + + + + + +
+{/if} \ No newline at end of file diff --git a/src/lib/Mobile/MobileHeader.svelte b/src/lib/Mobile/MobileHeader.svelte new file mode 100644 index 00000000..6a4c33f3 --- /dev/null +++ b/src/lib/Mobile/MobileHeader.svelte @@ -0,0 +1,44 @@ + +
+ {#if $selectedCharID !== -1 && $MobileSideBar > 0} + + {language.menu} + {:else if $selectedCharID !== -1} + + {$CurrentCharacter.name} +
+ +
+ {:else if $MobileGUIStack === 2 && $SettingsMenuIndex > -1} + + RisuAI + {:else if $MobileGUIStack === 1} +
+ +
+ {:else} + RisuAI + + {/if} +
\ No newline at end of file diff --git a/src/lib/Others/AlertComp.svelte b/src/lib/Others/AlertComp.svelte index c6eae299..12c2af51 100644 --- a/src/lib/Others/AlertComp.svelte +++ b/src/lib/Others/AlertComp.svelte @@ -19,6 +19,7 @@ import TextAreaInput from "../UI/GUI/TextAreaInput.svelte"; import ModuleChatMenu from "../Setting/Pages/Module/ModuleChatMenu.svelte"; import { ColorSchemeTypeStore } from "src/ts/gui/colorscheme"; + import Help from "./Help.svelte"; let btn let input = '' let cardExportType = 'realm' @@ -80,7 +81,7 @@ {:else if $alertStore.type === 'tos'} -
You should accept RisuRealm's { + {:else if $alertStore.type !== 'select' && $alertStore.type !== 'requestdata' && $alertStore.type !== 'addchar' && $alertStore.type !== 'hypaV2' && $alertStore.type !== 'chatOptions'} @@ -112,7 +113,7 @@ msg: 'yes' }) }}>Accept -
-
- - - + {#if $DataBase.useExperimental} + + {/if} - {:else if $alertStore.submsg === 'module'} - + {:else} + + + {:else} {#if $SizeStore.w < 1024} @@ -114,6 +141,9 @@ {#if $PlaygroundStore === 8} {/if} + {#if $PlaygroundStore === 101} + + {/if} {/if} \ No newline at end of file diff --git a/src/lib/Playground/ToolConvertion.svelte b/src/lib/Playground/ToolConvertion.svelte new file mode 100644 index 00000000..58f46d2f --- /dev/null +++ b/src/lib/Playground/ToolConvertion.svelte @@ -0,0 +1,49 @@ + + +

{language.promptConvertion}

+{language.convertionStep1} + +
+ {#each files as file, i} +
+
+ {#if file.type !== 'NOTSUPPORTED'} + {file.type} + {:else} + NOTSUPPORTED + {/if} + {file.name} +
+ +
+ {/each} + +
+ \ No newline at end of file diff --git a/src/lib/Setting/Pages/AdvancedSettings.svelte b/src/lib/Setting/Pages/AdvancedSettings.svelte index 5844c83c..5593e1a3 100644 --- a/src/lib/Setting/Pages/AdvancedSettings.svelte +++ b/src/lib/Setting/Pages/AdvancedSettings.svelte @@ -95,21 +95,23 @@
-
- - - -
-
- - - -
-
- - - -
+{#if $DataBase.useExperimental} +
+ + + +
+
+ + + +
+
+ + + +
+{/if} {#if $DataBase.showUnrecommended}
@@ -122,6 +124,10 @@
+
+ + +
@@ -139,22 +145,6 @@
{/if} -
- { - // access code is "tendo" - // I just put it on source code so it's not really a secret - // well, if you are reading this, you are a developer, so you can use this feature - // this is for testing 2.0 in real environment, but it's not ready yet - - const accessCode = 'tendo' - $DataBase.tpo = $DataBase.tpo - if(prompt("Access Code") === accessCode){ - $DataBase.tpo = !$DataBase.tpo - } - }}> - - -
+ + {#if $DataBase.aiModel === 'reverse_proxy'} @@ -563,8 +586,12 @@ }}/> {/if} + + + + {#if submenu !== -1} - + {/if} {/if} @@ -596,5 +623,5 @@ {/if} {#if submenu === -1} - + {/if} \ No newline at end of file diff --git a/src/lib/Setting/Pages/DisplaySettings.svelte b/src/lib/Setting/Pages/DisplaySettings.svelte index fbdf6a39..d5bcede5 100644 --- a/src/lib/Setting/Pages/DisplaySettings.svelte +++ b/src/lib/Setting/Pages/DisplaySettings.svelte @@ -8,11 +8,12 @@ import SelectInput from "src/lib/UI/GUI/SelectInput.svelte"; import OptionInput from "src/lib/UI/GUI/OptionInput.svelte"; import { updateAnimationSpeed } from "src/ts/gui/animation"; - import { changeColorScheme, colorSchemeList, exportColorScheme, importColorScheme, updateColorScheme, updateTextTheme } from "src/ts/gui/colorscheme"; + import { changeColorScheme, colorSchemeList, exportColorScheme, importColorScheme, updateColorScheme, updateTextThemeAndCSS } from "src/ts/gui/colorscheme"; import { DownloadIcon, FolderUpIcon } from "lucide-svelte"; import { guiSizeText, updateGuisize } from "src/ts/gui/guisize"; import TextInput from "src/lib/UI/GUI/TextInput.svelte"; import ColorInput from "src/lib/UI/GUI/ColorInput.svelte"; + import TextAreaInput from "src/lib/UI/GUI/TextAreaInput.svelte"; const onSchemeInputChange = (e:Event) => { changeColorScheme((e.target as HTMLInputElement).value) @@ -24,7 +25,7 @@

{language.display}

{#if submenu !== -1} -
+
-
- -
- {#if $DataBase.textScreenColor}
{ @@ -310,11 +307,52 @@
- {#if $DataBase.useExperimental} -
- - -
+
+ +
+ +
+ +
+ +
+ +
+ + {#if $DataBase.customQuotes} + {language.leadingSingleQuote} + + + {language.trailingSingleQuote} + + + {language.leadingDoubleQuote} + + + {language.trailingDoubleQuote} + {/if} +
+ + +
+ + {#if $DataBase.showUnrecommended} +
+ + +
+ +
+ + +
+ {/if} + + {language.customCSS} + { + updateTextThemeAndCSS() + }} /> + {/if} \ No newline at end of file diff --git a/src/lib/Setting/Pages/LanguageSettings.svelte b/src/lib/Setting/Pages/LanguageSettings.svelte index 23cdfe32..3ffafe78 100644 --- a/src/lib/Setting/Pages/LanguageSettings.svelte +++ b/src/lib/Setting/Pages/LanguageSettings.svelte @@ -117,6 +117,21 @@ {/if} + {#if $DataBase.translatorType === 'google'} + Translator Input Language + + Auto + English + Chinese + Japanese + Korean + French + Spanish + German + Russian + + {/if} +
diff --git a/src/lib/Setting/Pages/Module/ModuleChatMenu.svelte b/src/lib/Setting/Pages/Module/ModuleChatMenu.svelte index dd72ef60..89ad0c7e 100644 --- a/src/lib/Setting/Pages/Module/ModuleChatMenu.svelte +++ b/src/lib/Setting/Pages/Module/ModuleChatMenu.svelte @@ -19,16 +19,6 @@ }).sort((a, b) => { let score = a.name.toLowerCase().localeCompare(b.name.toLowerCase()) - - if(!alertMode){ - if(db.enabledModules.includes(a.id)){ - score += 1000 - } - if(db.enabledModules.includes(b.id)){ - score -= 1000 - } - } - return score }) } diff --git a/src/lib/Setting/Pages/Module/ModuleMenu.svelte b/src/lib/Setting/Pages/Module/ModuleMenu.svelte index c8641df3..d107509f 100644 --- a/src/lib/Setting/Pages/Module/ModuleMenu.svelte +++ b/src/lib/Setting/Pages/Module/ModuleMenu.svelte @@ -3,73 +3,39 @@ import TextInput from "src/lib/UI/GUI/TextInput.svelte"; import LoreBookData from "src/lib/SideBars/LoreBook/LoreBookData.svelte"; import type { RisuModule } from "src/ts/process/modules"; - import { PlusIcon } from "lucide-svelte"; + import { DownloadIcon, FolderUpIcon, PlusIcon, TrashIcon } from "lucide-svelte"; import { alertConfirm } from "src/ts/alert"; import RegexList from "src/lib/SideBars/Scripts/RegexList.svelte"; import TriggerList from "src/lib/SideBars/Scripts/TriggerList.svelte"; import Check from "src/lib/UI/GUI/CheckInput.svelte"; - import Help from "src/lib/Others/Help.svelte"; - import TextAreaInput from "src/lib/UI/GUI/TextAreaInput.svelte"; - import Button from "src/lib/UI/GUI/Button.svelte"; - import { openURL } from "src/ts/storage/globalApi"; - import { hubURL } from "src/ts/characterCards"; - + import Help from "src/lib/Others/Help.svelte"; + import TextAreaInput from "src/lib/UI/GUI/TextAreaInput.svelte"; + import Button from "src/lib/UI/GUI/Button.svelte"; + import { getFileSrc, openURL, saveAsset } from "src/ts/storage/globalApi"; + import { hubURL } from "src/ts/characterCards"; + import { exportRegex, importRegex } from "src/ts/process/scripts"; + import { selectMultipleFile } from "src/ts/util"; + import { DataBase } from 'src/ts/storage/database'; + let submenu = 0 export let currentModule:RisuModule + let assetFileExtensions:string[] = [] + let assetFilePath:string[] = [] - - async function toggleLorebook(){ - if(!Array.isArray(currentModule.lorebook)){ - currentModule.lorebook = [] - } - else if(currentModule.lorebook.length > 0){ - const conf = await alertConfirm(language.confirmRemoveModuleFeature) - if(conf){ - currentModule.lorebook = undefined + $: { + if($DataBase.useAdditionalAssetsPreview){ + if(currentModule?.assets){ + for(let i = 0; i < currentModule.assets.length; i++){ + if(currentModule.assets[i].length > 2 && currentModule.assets[i][2]) { + assetFileExtensions[i] = currentModule.assets[i][2] + } else + assetFileExtensions[i] = currentModule.assets[i][1].split('.').pop() + getFileSrc(currentModule.assets[i][1]).then((filePath) => { + assetFilePath[i] = filePath + }) + } } } - else{ - currentModule.lorebook = undefined - } - } - - async function toggleRegex(){ - if(!Array.isArray(currentModule.regex)){ - currentModule.regex = [] - } - else if(currentModule.regex.length > 0){ - const conf = await alertConfirm(language.confirmRemoveModuleFeature) - if(conf){ - currentModule.regex = undefined - } - } - else{ - currentModule.regex = undefined - } - } - - async function toggleTrigger(){ - if(!Array.isArray(currentModule.trigger)){ - currentModule.trigger = [] - } - else if(currentModule.trigger.length > 0){ - const conf = await alertConfirm(language.confirmRemoveModuleFeature) - if(conf){ - currentModule.trigger = undefined - } - } - else{ - currentModule.trigger = undefined - } - } - - function toggleBackground(){ - if(typeof(currentModule.backgroundEmbedding) !== 'string'){ - currentModule.backgroundEmbedding = '' - } - else{ - currentModule.backgroundEmbedding = undefined - } } function addLorebook(){ @@ -116,27 +82,56 @@ } -{language.basicInfo} - - -{language.moduleContent} -
- - - - + +
-{#if (Array.isArray(currentModule.lorebook))} - {language.loreBook} +{#if submenu === 0} + {language.name} + + {language.description} + + {language.namespace} + +
+ +
+{/if} +{#if submenu === 1 && (Array.isArray(currentModule.lorebook))}
{#each currentModule.lorebook as lore, i} { @@ -150,76 +145,92 @@ {/if} -{#if (Array.isArray(currentModule.regex))} - {language.regexScript} +{#if submenu === 2 && (Array.isArray(currentModule.regex))} - +
+ + + +
{/if} -{#if typeof(currentModule.backgroundEmbedding) === 'string'} - {language.backgroundHTML} +{#if submenu === 4 && typeof(currentModule.backgroundEmbedding) === 'string'} {/if} -{#if (Array.isArray(currentModule.trigger))} - {language.triggerScript} -
- - +{#if submenu === 5 && (Array.isArray(currentModule.assets))} +
+ + + + + + {#if (!currentModule.assets) || currentModule.assets.length === 0} + +
No Assets
+ + {:else} + {#each currentModule.assets as assets, i} + + + + + + {/each} + {/if} +
{language.value} + +
+ {#if assetFilePath[i] && $DataBase.useAdditionalAssetsPreview} + {#if assetFileExtensions[i] === 'mp4'} + + + {:else if assetFileExtensions[i] === 'mp3'} + + {:else} + {assets[0]}/ + {/if} + {/if} + + + +
- {#if currentModule?.trigger?.[0]?.effect?.[0]?.type === 'triggerlua'} - - - {:else} - - - {/if} +{/if} + +{#if submenu === 3 && (Array.isArray(currentModule.trigger))} +
-{/if} - -
- -
\ No newline at end of file +{/if} \ No newline at end of file diff --git a/src/lib/Setting/Pages/Module/ModuleSettings.svelte b/src/lib/Setting/Pages/Module/ModuleSettings.svelte index 74e80420..48b86ab5 100644 --- a/src/lib/Setting/Pages/Module/ModuleSettings.svelte +++ b/src/lib/Setting/Pages/Module/ModuleSettings.svelte @@ -27,14 +27,6 @@ }).sort((a, b) => { let score = a.name.toLowerCase().localeCompare(b.name.toLowerCase()) - - if(db.enabledModules.includes(a.id)){ - score += 1000 - } - if(db.enabledModules.includes(b.id)){ - score -= 1000 - } - return score }) } @@ -73,14 +65,7 @@ diff --git a/src/lib/Setting/Pages/OtherBotSettings.svelte b/src/lib/Setting/Pages/OtherBotSettings.svelte index 2efd6801..44a542ac 100644 --- a/src/lib/Setting/Pages/OtherBotSettings.svelte +++ b/src/lib/Setting/Pages/OtherBotSettings.svelte @@ -13,6 +13,7 @@ import Button from "src/lib/UI/GUI/Button.svelte"; import { getCharImage } from "src/ts/characters"; import Arcodion from "src/lib/UI/Arcodion.svelte"; + import CheckInput from "src/lib/UI/GUI/CheckInput.svelte"; $:{ $DataBase.NAIImgConfig ??= { width: 512, @@ -75,6 +76,7 @@ Dall-E Stability API ComfyUI + Fal.ai {#if $DataBase.sdProvider === 'webui'} @@ -294,11 +296,42 @@ Timeout (sec) {/if} + + {#if $DataBase.sdProvider === 'fal'} + Fal.ai API Key + + + Width + + Height + + + Model + + Flux[Dev] + Flux[Dev] with Lora + Flux[Pro] + Flux[Schnell] + + + {#if $DataBase.falModel === 'fal-ai/flux-lora'} + Lora Model URL + + + Lora Weight + + {/if} + + + {/if} {/if} {#if submenu === 1 || submenu === -1} + Auto Speech + + ElevenLabs API key diff --git a/src/lib/Setting/Pages/PromptSettings.svelte b/src/lib/Setting/Pages/PromptSettings.svelte index c9656b47..1a025efa 100644 --- a/src/lib/Setting/Pages/PromptSettings.svelte +++ b/src/lib/Setting/Pages/PromptSettings.svelte @@ -10,6 +10,8 @@ import NumberInput from "src/lib/UI/GUI/NumberInput.svelte"; import Help from "src/lib/Others/Help.svelte"; import TextAreaInput from "src/lib/UI/GUI/TextAreaInput.svelte"; + import SelectInput from "src/lib/UI/GUI/SelectInput.svelte"; + import OptionInput from "src/lib/UI/GUI/OptionInput.svelte"; let sorted = 0 let opened = 0 @@ -112,8 +114,11 @@ - + + + + {#if $DataBase.showUnrecommended} @@ -121,8 +126,22 @@ {/if} {language.maxThoughtTagDepth} + {language.groupOtherBotRole} + + User + System + assistant + {language.customPromptTemplateToggle} {language.defaultVariables} + {language.groupInnerFormat} + \n{{slot}}\n`} bind:value={$DataBase.groupTemplate}/> + {#if $DataBase.jsonSchemaEnabled} + {language.jsonSchema} + + {language.extractJson} + + {/if} {/if} \ No newline at end of file diff --git a/src/lib/Setting/Pages/ThanksPage.svelte b/src/lib/Setting/Pages/ThanksPage.svelte index 94a91e6b..07264880 100644 --- a/src/lib/Setting/Pages/ThanksPage.svelte +++ b/src/lib/Setting/Pages/ThanksPage.svelte @@ -21,7 +21,7 @@ const supp = await fetch("https://sv.risuai.xyz/patreon/list") const list = await supp.json() as supporterL[] - const dummy:supporters = { + const thanks:supporters = { //random names I: list.filter((v) => v.amount < 5).map((v) => v.name), II: list.filter((v) => v.amount >= 5 && v.amount < 10).map((v) => v.name), @@ -29,9 +29,10 @@ IV: list.filter((v) => v.amount >= 20 && v.amount < 50).map((v) => v.name), V: list.filter((v) => v.amount >= 50).map((v) => v.name), } - return dummy + return thanks } +

{language.supporterThanks}

{language.supporterThanksDesc} @@ -56,7 +57,7 @@ {:then supporter}

Supporter V

-
+
{#each supporter.V as support}
@@ -66,7 +67,7 @@ {/each}

Supporter IV

-
+
{#each supporter.IV as support}
@@ -76,7 +77,7 @@ {/each}

Supporter III

-
+
{#each supporter.III as support}
@@ -87,7 +88,7 @@ {/each}

Supporter II

-
+
{#each supporter.II as support}
@@ -98,7 +99,7 @@ {/each}

Supporter I

-
+
{#each supporter.I as support}
diff --git a/src/lib/Setting/Pages/UserSettings.svelte b/src/lib/Setting/Pages/UserSettings.svelte index 7418e4d5..6130a87c 100644 --- a/src/lib/Setting/Pages/UserSettings.svelte +++ b/src/lib/Setting/Pages/UserSettings.svelte @@ -1,10 +1,10 @@ -
-
- {#if window.innerWidth >= 700 || $SettingsMenuIndex === -1} -
- - - - +
+
+ {#if (window.innerWidth >= 700 && !$MobileGUI) || $SettingsMenuIndex === -1} +
+ + {#if !$isLite} + + + + + {/if} - - - + {#if !$isLite} + + + + {/if} - - - {#if window.innerWidth < 700} + {#if !$isLite} + + + {/if} + {#if window.innerWidth < 700 && !$MobileGUI} {/if}
{/if} - {#if window.innerWidth >= 700 || $SettingsMenuIndex !== -1} + {#if (window.innerWidth >= 700 && !$MobileGUI) || $SettingsMenuIndex !== -1} {#key $SettingsMenuIndex} -
+
{#if $SettingsMenuIndex === 0} {:else if $SettingsMenuIndex === 1} - { + { $SettingsMenuIndex = 13 }} /> {:else if $SettingsMenuIndex === 2} @@ -182,22 +191,21 @@ {/if}
{/key} - + {#if !$MobileGUI} + + {/if} {/if}
-{#if openPresetList} - {openPresetList = false}} /> -{/if} {#if openLoreList} {openLoreList = false}} /> {/if} diff --git a/src/lib/Setting/botpreset.svelte b/src/lib/Setting/botpreset.svelte index b075fd75..086f8096 100644 --- a/src/lib/Setting/botpreset.svelte +++ b/src/lib/Setting/botpreset.svelte @@ -51,9 +51,6 @@ if(data.type === ''){ downloadPreset(i, 'risupreset') } - if(data.type === 'json'){ - downloadPreset(i, 'json') - } if(data.type === 'realm'){ $ShowRealmFrameStore = `preset:${i}` } diff --git a/src/lib/Setting/listedPersona.svelte b/src/lib/Setting/listedPersona.svelte new file mode 100644 index 00000000..2835cc8f --- /dev/null +++ b/src/lib/Setting/listedPersona.svelte @@ -0,0 +1,38 @@ + + +
+
+
+

{language.persona}

+
+ +
+
+ {#each $DataBase.personas as persona, i} + + {/each} +
+
+ + \ No newline at end of file diff --git a/src/lib/SideBars/CharConfig.svelte b/src/lib/SideBars/CharConfig.svelte index 554beb21..e5b5fae9 100644 --- a/src/lib/SideBars/CharConfig.svelte +++ b/src/lib/SideBars/CharConfig.svelte @@ -2,14 +2,14 @@ import { language } from "../../lang"; import { tokenizeAccurate } from "../../ts/tokenizer"; import { DataBase, saveImage as saveAsset, type Database, type character, type groupChat } from "../../ts/storage/database"; - import { ShowRealmFrameStore, selectedCharID } from "../../ts/stores"; - import { PlusIcon, SmileIcon, TrashIcon, UserIcon, ActivityIcon, BookIcon, User, CurlyBraces, Volume2Icon } from 'lucide-svelte' + import { CharConfigSubMenu, CurrentChat, MobileGUI, ShowRealmFrameStore, selectedCharID } from "../../ts/stores"; + import { PlusIcon, SmileIcon, TrashIcon, UserIcon, ActivityIcon, BookIcon, User, CurlyBraces, Volume2Icon, DownloadIcon, FolderUpIcon } from 'lucide-svelte' import Check from "../UI/GUI/CheckInput.svelte"; import { addCharEmotion, addingEmotion, getCharImage, rmCharEmotion, selectCharImg, makeGroupImage, removeChar, changeCharImage } from "../../ts/characters"; import LoreBook from "./LoreBook/LoreBookSetting.svelte"; import { alertConfirm, alertMd, alertNormal, alertSelectChar, alertTOS, showHypaV2Alert } from "../../ts/alert"; import BarIcon from "./BarIcon.svelte"; - import { findCharacterbyId, getAuthorNoteDefaultText, parseKeyValue, selectMultipleFile } from "../../ts/util"; + import { findCharacterbyId, getAuthorNoteDefaultText, parseKeyValue, selectMultipleFile, selectSingleFile } from "../../ts/util"; import { onDestroy } from "svelte"; import {isEqual} from 'lodash' import Help from "../Others/Help.svelte"; @@ -29,10 +29,11 @@ import { updateInlayScreen } from "src/ts/process/inlayScreen"; import { registerOnnxModel } from "src/ts/process/transformers"; import MultiLangInput from "../UI/GUI/MultiLangInput.svelte"; - import { applyModule } from "src/ts/process/modules"; - + import { applyModule } from "src/ts/process/modules"; + import { exportRegex, importRegex } from "src/ts/process/scripts"; + import Arcodion from "../UI/Arcodion.svelte"; + import SliderInput from "../UI/GUI/SliderInput.svelte"; - let subMenu = 0 let iconRemoveMode = false let emos:[string, string][] = [] let tokens = { @@ -103,6 +104,19 @@ } emos = currentChar.data.emotionImages currentChar = currentChar + + if (currentChar.data.ttsMode === 'gptsovits' && (currentChar.data as character).gptSoVitsConfig) { + if (!(currentChar.data as character).gptSoVitsConfig.use_prompt) { + (currentChar.data as character).gptSoVitsConfig.prompt = undefined + } + if((currentChar.data as character).gptSoVitsConfig.use_auto_path){ + (currentChar.data as character).gptSoVitsConfig.ref_audio_path = undefined; + + (currentChar.data as character).gptSoVitsConfig.use_prompt = false; + (currentChar.data as character).gptSoVitsConfig.prompt = undefined; + + } + } }) let assetFileExtensions:string[] = [] @@ -147,35 +161,64 @@ version: 'v2' }; } + $: if (currentChar.data.ttsMode === 'gptsovits' && (currentChar.data as character).gptSoVitsConfig === undefined) { + (currentChar.data as character).gptSoVitsConfig = { + url: '', + use_auto_path: false, + ref_audio_path: '', + use_long_audio: false, + ref_audio_data: { + fileName: '', + assetId: '' + }, + volume: 1.0, + text_lang: 'auto', + text: 'en', + use_prompt: false, + prompt_lang: 'en', + top_p: 1, + temperature: 0.7, + speed: 1, + top_k: 5, + text_split_method: 'cut0', + }; + } + + $: { + if(currentChar.type === 'group' && ($CharConfigSubMenu === 4 || $CharConfigSubMenu === 5)){ + $CharConfigSubMenu = 0 + } + } + -{#if licensed !== 'private'} +{#if licensed !== 'private' && !$MobileGUI}
- - - {#if currentChar.type === 'character'} - - {/if} -
{/if} -{#if subMenu === 0} +{#if $CharConfigSubMenu === 0} {#if currentChar.type !== 'group' && licensed !== 'private'} {language.description} @@ -243,41 +286,44 @@ highlight placeholder={getAuthorNoteDefaultText()} /> - {tokens.localNote} {language.tokens} -
- -
+ {tokens.localNote} {language.tokens} - {#each parseKeyValue($DataBase.customPromptTemplateToggle) as toggle} -
- { - $DataBase.globalChatVariables[`toggle_${toggle[0]}`] = $DataBase.globalChatVariables[`toggle_${toggle[0]}`] === '1' ? '0' : '1' - }} /> + {#if !$MobileGUI} +
+
- {/each} - - {#if $DataBase.supaModelType !== 'none' || $DataBase.hanuraiEnable} - {#if $DataBase.hanuraiEnable} + {#each parseKeyValue($DataBase.customPromptTemplateToggle) as toggle}
- + { + $DataBase.globalChatVariables[`toggle_${toggle[0]}`] = $DataBase.globalChatVariables[`toggle_${toggle[0]}`] === '1' ? '0' : '1' + }} />
- {:else if $DataBase.hypaMemory} + {/each} + + + {#if $DataBase.supaModelType !== 'none' || $DataBase.hanuraiEnable} + {#if $DataBase.hanuraiEnable} +
+ +
+ {:else if $DataBase.hypaMemory} +
+ +
+ {:else} +
+ +
+ {/if} + {/if} + + {#if currentChar.type === 'group'}
- -
- {:else} -
- +
{/if} {/if} - - {#if currentChar.type === 'group'} -
- -
- {/if} {#if licensed === 'private'} +
+ + + +
{language.triggerScript} -
- - - -
- {#if currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type === 'triggercode'} - - {:else if currentChar.data?.triggerscript?.[0]?.effect?.[0]?.type === 'triggerlua'} - - - {:else} - - {/if} - + + {#if currentChar.data.virtualscript || $DataBase.showUnrecommended} {language.charjs} {/if} {/if} -{:else if subMenu === 5} +{:else if $CharConfigSubMenu === 5} {#if currentChar.type === 'character'} -

TTS

+ {#if !$MobileGUI} +

TTS

+ {/if} {language.provider} - { + { if(currentChar.type === 'character'){ currentChar.data.ttsSpeech = '' } @@ -681,6 +664,7 @@ NovelAI Huggingface VITS + GPT-SoVITS @@ -764,23 +748,20 @@ v1 v2 - {/if} - {#if currentChar.data.ttsMode === 'openai'} + {:else if currentChar.data.ttsMode === 'openai'} Unset {#each oaiVoices as voice} {voice} {/each} - {/if} - {#if currentChar.data.ttsMode === 'huggingface'} + {:else if currentChar.data.ttsMode === 'huggingface'} Model Language - {/if} - {#if currentChar.data.ttsMode === 'vits'} + {:else if currentChar.data.ttsMode === 'vits'} {#if currentChar.data.vits} {currentChar.data.vits.name ?? 'Unnamed VitsModel'} {:else} @@ -792,6 +773,110 @@ currentChar.data.vits = model } }}>{language.selectModel} + {:else if currentChar.data.ttsMode === 'gptsovits'} + Volume + + URL + + + Use Auto Path + + + {#if !currentChar.data.gptSoVitsConfig.use_auto_path} + Reference Audio Path (e.g. C:/Users/user/Downloads/GPT-SoVITS-v2-240821) + + {/if} + + Use Long Audio + + + Reference Audio Data (3~10s audio file) + + Text Language + + Multi-language Mixed + Multi-language Mixed (Cantonese) + English + Chinese-English Mixed + Japanese-English Mixed + Cantonese-English Mixed + Korean-English Mixed + Chinese + Japanese + Cantonese + Korean + + + {#if !currentChar.data.gptSoVitsConfig.use_long_audio} + Use Reference Audio Script + + {/if} + + {#if currentChar.data.gptSoVitsConfig.use_prompt && !currentChar.data.gptSoVitsConfig.use_long_audio} + Reference Audio Script + + {/if} + + Reference Audio Language + + Multi-language Mixed + Multi-language Mixed (Cantonese) + English + Chinese-English Mixed + Japanese-English Mixed + Cantonese-English Mixed + Korean-English Mixed + Chinese + Japanese + Cantonese + Korean + + Top P + + + Temperature + + + Speed + + + Top K + + + Text Split Method + + Cut 0 (No splitting) + Cut 1 (Split every 4 sentences) + Cut 2 (Split every 50 characters) + Cut 3 (Split by Chinese periods) + Cut 4 (Split by English periods) + Cut 5 (Split by various punctuation marks) + {/if} {#if currentChar.data.ttsMode}
@@ -799,8 +884,10 @@
{/if} {/if} -{:else if subMenu === 2} -

{language.advancedSettings}

+{:else if $CharConfigSubMenu === 2} + {#if !$MobileGUI} +

{language.advancedSettings}

+ {/if} {#if currentChar.type !== 'group'} {language.exampleMessage} @@ -834,6 +921,9 @@ {language.defaultVariables} + {language.translatorNote} + + {language.creator} @@ -879,7 +969,7 @@
- {language.additionalAssets} -
- - - - - - {#if (!currentChar.data.additionalAssets) || currentChar.data.additionalAssets.length === 0} + +
+
{language.value} - -
-
No Assets
- - {:else} - {#each currentChar.data.additionalAssets as assets, i} - - - - + + for(const f of da){ + const img = f.data + const name = f.name + const extension = name.split('.').pop().toLowerCase() + const imgp = await saveAsset(img,'', extension) + currentChar.data.additionalAssets.push([name, imgp, extension]) + currentChar.data.additionalAssets = currentChar.data.additionalAssets + } + } + }}> + + + + + {#if (!currentChar.data.additionalAssets) || currentChar.data.additionalAssets.length === 0} + +
No Assets
- {/each} - {/if} -
- {#if assetFilePath[i] && database.useAdditionalAssetsPreview} - {#if assetFileExtensions[i] === 'mp4'} - - - {:else if assetFileExtensions[i] === 'mp3'} - - {:else} - {assets[0]}/ - {/if} - {/if} - - - {language.value} + -
-
+ {:else} + {#each currentChar.data.additionalAssets as assets, i} + + + {#if assetFilePath[i] && database.useAdditionalAssetsPreview} + {#if assetFileExtensions[i] === 'mp4'} + + + {:else if assetFileExtensions[i] === 'mp3'} + + {:else if ['png', 'webp', 'jpeg', 'jpg', 'gif'].includes(assetFileExtensions[i])} + {assets[0]}/ + {/if} + {/if} + + + + + + + + {/each} + {/if} + +
+
diff --git a/src/lib/SideBars/DevTool.svelte b/src/lib/SideBars/DevTool.svelte new file mode 100644 index 00000000..91f4ab48 --- /dev/null +++ b/src/lib/SideBars/DevTool.svelte @@ -0,0 +1,251 @@ + + + +
+ {#if $CurrentChat.scriptstate && Object.keys($CurrentChat.scriptstate).length > 0} + {#each Object.keys($CurrentChat.scriptstate) as key} + {key} + {#if typeof $CurrentChat.scriptstate[key] === "object"} +
Object
+ {:else if typeof $CurrentChat.scriptstate[key] === "string"} + + {:else if typeof $CurrentChat.scriptstate[key] === "number"} + + {/if} + {/each} + {:else} +
No variables
+ {/if} +
+
+ + +
+ {#await getCharToken($CurrentCharacter)} + Character Persistant +
Loading...
+ Character Dynamic +
Loading...
+ {:then token} + Character Persistant +
{token.persistant} Tokens
+ Character Dynamic +
{token.dynamic} Tokens
+ {/await} + {#await getChatToken($CurrentChat)} + Current Chat +
Loading...
+ {:then token} + Current Chat +
{token} Tokens
+ {/await} + {#if $DataBase.promptTemplate} + {#await tokenizePreset($DataBase.promptTemplate)} + Prompt Template +
Loading...
+ {:then token} + Prompt Template +
{token} Tokens
+ {/await} + {/if} +
+ This is a estimate. The actual token count may be different. +
+ + +
+ {#each autopilot as text} + + {/each} +
+
+ + + + + +
+ +
+ + + + Type + + Chat + Instruct + + {#if previewMode === 'instruct'} + Instruction Type + + {#each Object.keys(chatTemplates) as template} + {template} + {/each} + Custom Jinja + + {#if instructType === 'jinja'} + Custom Jinja + + {/if} + {/if} + Join + + With Join + Without Join + + + + + \ No newline at end of file diff --git a/src/lib/SideBars/LoreBook/LoreBookSetting.svelte b/src/lib/SideBars/LoreBook/LoreBookSetting.svelte index c53ed8a0..b8d8d133 100644 --- a/src/lib/SideBars/LoreBook/LoreBookSetting.svelte +++ b/src/lib/SideBars/LoreBook/LoreBookSetting.svelte @@ -70,9 +70,12 @@
{/if}
- + {#if $DataBase.useExperimental} + + {/if} +
{/if} {#if submenu !== 2} diff --git a/src/lib/SideBars/Scripts/RegexData.svelte b/src/lib/SideBars/Scripts/RegexData.svelte index f6cc5c5b..b9ac7b21 100644 --- a/src/lib/SideBars/Scripts/RegexData.svelte +++ b/src/lib/SideBars/Scripts/RegexData.svelte @@ -8,13 +8,65 @@ import TextAreaInput from "../../UI/GUI/TextAreaInput.svelte"; import SelectInput from "../../UI/GUI/SelectInput.svelte"; import OptionInput from "../../UI/GUI/OptionInput.svelte"; + import Arcodion from "src/lib/UI/Arcodion.svelte"; + import NumberInput from "src/lib/UI/GUI/NumberInput.svelte"; export let value:customscript export let onRemove: () => void = () => {} export let onClose: () => void = () => {} export let onOpen: () => void = () => {} - export let idx:number + + const checkFlagContain = (flag:string, matchFlag:string) => { + if(flag.length === 1){ + matchFlag = value.flag.replace(/<(.+?)>/g, '') + } + return matchFlag.includes(flag) + } + + const toggleFlag = (flag:string) => { + console.log(flag, checkFlagContain(flag, value.flag), value.flag) + if(checkFlagContain(flag, value.flag)){ + value.flag = value.flag.replace(flag, '') + } + else{ + value.flag += flag + } + } + + const getOrder = (flag:string) => { + const order = flag.match(//)?.[1] + if(order === undefined || order === null){ + return 0 + } + return parseInt(order) + } + + const changeOrder = (order:number) => { + if(value.flag.includes('/, ``) + } + else{ + value.flag += `` + } + } + + const flags = [ + //Vanila JS flags + ['Global (g)', 'g'], + ['Case Insensitive (i)', 'i'], + ['Multi Line (m)', 'm'], + ['Unicode (u)', 'u'], + ['Dot All (s)', 's'], + + //Custom flags + ['Move Top', ''], + ['Move Bottom', ''], + ['Repeat Back', ''], + ['IN CBS Parsing', ''], + ['No Newline Subfix', ''], + ] + let open = false @@ -60,8 +112,32 @@ OUT: {#if value.ableFlag} - FLAG: - + + + Normal Flag +
+ {#each flags as flag, i} + + {/each} +
+ + Order Flag + { + changeOrder(parseInt(e.currentTarget.value)) + }} /> + +
{/if}
{ diff --git a/src/lib/SideBars/Scripts/TriggerList.svelte b/src/lib/SideBars/Scripts/TriggerList.svelte index 9c4c63b7..53fd4b9f 100644 --- a/src/lib/SideBars/Scripts/TriggerList.svelte +++ b/src/lib/SideBars/Scripts/TriggerList.svelte @@ -6,11 +6,21 @@ import Sortable from "sortablejs"; import { sleep, sortableOptions } from "src/ts/util"; import { onDestroy, onMount } from "svelte"; + import { language } from "src/lang"; + import { alertConfirm } from "src/ts/alert"; + import TextAreaInput from "src/lib/UI/GUI/TextAreaInput.svelte"; + import Button from "src/lib/UI/GUI/Button.svelte"; + import { openURL } from "src/ts/storage/globalApi"; + import { hubURL } from "src/ts/characterCards"; + import { PlusIcon } from "lucide-svelte"; let stb: Sortable = null let ele: HTMLDivElement let sorted = 0 let opened = 0 const createStb = () => { + if (!ele) { + return; + } stb = Sortable.create(ele, { onEnd: async () => { let idx:number[] = [] @@ -60,17 +70,70 @@ -
- {#if value.length === 0} -
No Scripts
- {/if} - {#key sorted} - {#each value as triggerscript, i} - { - let triggerscript = value - triggerscript.splice(i, 1) - value = triggerscript - }}/> - {/each} - {/key} -
\ No newline at end of file +
+ + +
+{#if value?.[0]?.effect?.[0]?.type === 'triggerlua'} + + +{:else} +
+ {#if value.length === 0} +
No Scripts
+ {/if} + {#key sorted} + {#each value as triggerscript, i} + { + let triggerscript = value + triggerscript.splice(i, 1) + value = triggerscript + }}/> + {/each} + {/key} +
+ +{/if} \ No newline at end of file diff --git a/src/lib/SideBars/SideChatList.svelte b/src/lib/SideBars/SideChatList.svelte index fde445ed..6287974e 100644 --- a/src/lib/SideBars/SideChatList.svelte +++ b/src/lib/SideBars/SideChatList.svelte @@ -10,10 +10,11 @@ import { findCharacterbyId, parseKeyValue, sleep, sortableOptions } from "src/ts/util"; import CheckInput from "../UI/GUI/CheckInput.svelte"; import { createMultiuserRoom } from "src/ts/sync/multiuser"; - import { CurrentCharacter } from "src/ts/stores"; + import { CurrentCharacter, MobileGUI, ReloadGUIPointer } from "src/ts/stores"; import Sortable from 'sortablejs/modular/sortable.core.esm.js'; import { onDestroy, onMount } from "svelte"; import { v4 } from "uuid"; + import { reverse } from "lodash"; export let chara:character|groupChat let editMode = false @@ -68,7 +69,7 @@ const len = chara.chats.length let chats = chara.chats chats.unshift({ - message:[], note:'', name:`New Chat ${len + 1}`, localLore:[] + message:[], note:'', name:`New Chat ${len + 1}`, localLore:[], fmIndex: -1 }) if(cha.type === 'group'){ cha.characters.map((c) => { @@ -81,6 +82,7 @@ } chara.chats = chats chara.chatPage = 0 + $ReloadGUIPointer += 1 }}>New Chat
{#key sorted} @@ -88,6 +90,8 @@ - + + + {#if $DataBase.enableDevTools} + + {/if}
- {#if $botMakerMode} + {#if devTool} + + {:else if $botMakerMode} {:else} {/if} {/if} - {:else if sideBarMode === 1} - - - - - {:else if sideBarMode === 2} - {/if}
-{#if openPresetList} - { - openPresetList = false; - }} - /> -{/if} - {#if $DynamicGUI}
{ if($sideBarClosing){ diff --git a/src/lib/UI/Arcodion.svelte b/src/lib/UI/Arcodion.svelte index 03d4418b..f2325716 100644 --- a/src/lib/UI/Arcodion.svelte +++ b/src/lib/UI/Arcodion.svelte @@ -18,7 +18,9 @@ on:click={() => { open = !open }} - >{name}{#if help} + > + {name} + {#if help} {/if} {#if open} diff --git a/src/lib/UI/GUI/CheckInput.svelte b/src/lib/UI/GUI/CheckInput.svelte index 6f440e45..a4dc1883 100644 --- a/src/lib/UI/GUI/CheckInput.svelte +++ b/src/lib/UI/GUI/CheckInput.svelte @@ -6,6 +6,7 @@ export let margin = true export let name = '' export let hiddenName = false + export let reverse = false export let className = "" export let grayText = false @@ -16,6 +17,9 @@ aria-describedby="{name} {check ? 'abled' : 'disabled'}" aria-labelledby="{name} {check ? 'abled' : 'disabled'}" > + {#if reverse} + {name} + {/if} {/if} - {#if !hiddenName} + {#if !hiddenName && !reverse} {name} {/if} diff --git a/src/lib/UI/GUI/ColorInput.svelte b/src/lib/UI/GUI/ColorInput.svelte index 238c0cfb..c8d9d8af 100644 --- a/src/lib/UI/GUI/ColorInput.svelte +++ b/src/lib/UI/GUI/ColorInput.svelte @@ -1,11 +1,13 @@
diff --git a/src/lib/UI/GUI/NumberInput.svelte b/src/lib/UI/GUI/NumberInput.svelte index 59629803..e99825d6 100644 --- a/src/lib/UI/GUI/NumberInput.svelte +++ b/src/lib/UI/GUI/NumberInput.svelte @@ -24,6 +24,7 @@ /> diff --git a/src/lib/UI/GUI/SideBarArrow.svelte b/src/lib/UI/GUI/SideBarArrow.svelte index ccf2d300..4916e399 100644 --- a/src/lib/UI/GUI/SideBarArrow.svelte +++ b/src/lib/UI/GUI/SideBarArrow.svelte @@ -1,18 +1,20 @@ -{#if $sideBarStore && !$DynamicGUI} - -{:else} - +{#if !$MobileGUI} + {#if $sideBarStore && !$DynamicGUI} + + {:else} + + {/if} {/if} \ No newline at end of file diff --git a/src/lib/UI/GUI/SliderInput.svelte b/src/lib/UI/GUI/SliderInput.svelte index 594d9d87..9601a1a3 100644 --- a/src/lib/UI/GUI/SliderInput.svelte +++ b/src/lib/UI/GUI/SliderInput.svelte @@ -9,28 +9,42 @@ on:change > --> -
+
+ {#if disableable} + +
+ { + if(c) { + value = min; + } else { + value = -1000; + } + }}> +
+ {/if}
{ + on:pointerdown={(event) => { mouseDown = true; changeValue(event); }} - on:mousemove={(event) => { + on:pointermove={(event) => { if (mouseDown) { changeValue(event); } }} - on:mouseup={() => { - mouseDown = false; - }} - on:mouseleave={() => { + on:pointerup={() => { + mouseDown = false; + }} + + on:pointerleave={() => { mouseDown = false; }} bind:this={slider} @@ -43,13 +57,16 @@ - {customText === undefined ? (value * multiple).toFixed(fixed) : customText} + {customText === undefined ? (value === -1000 ? language.disabled : (value * multiple).toFixed(fixed)) : customText}
-
-
- {#if $SizeStore.w < 768} - - {:else} - - - {/if} - -
-
- {#if !googleBuild} +{#if $MobileGUI} +
+
+ +
+ +
+
+{:else} +
- {/if} - - - - -
+ + + + +
+{/if} {@html hubAdditionalHTML}
{#key charas} diff --git a/src/preload.ts b/src/preload.ts index 53b9190e..456316f2 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -4,7 +4,7 @@ export function preLoadCheck(){ const searchParams = new URLSearchParams(location.search); //@ts-ignore - const isTauri = !!window.__TAURI__ + const isTauri = !!window.__TAURI_INTERNALS__ //@ts-ignore const isNodeServer = !!globalThis.__NODE__ const isCapacitor = Capacitor.isNativePlatform(); @@ -19,6 +19,15 @@ export function preLoadCheck(){ else if(searchParams.has('mainpage')) { localStorage.setItem('mainpage', searchParams.get('mainpage')); } + + if(isWeb) { + //Add beforeunload event listener to prevent the user from leaving the page + window.addEventListener('beforeunload', (e) => { + e.preventDefault() + //legacy browser + e.returnValue = true + }) + } // Redirect to the main page if the user has not visited the main page diff --git a/src/styles.css b/src/styles.css index 97e87ca7..4a8eaab9 100644 --- a/src/styles.css +++ b/src/styles.css @@ -242,4 +242,16 @@ html, body{ background-color: var(--tw-prose-pre-bg); padding: 0.125rem 0.25rem; border-radius: 0.25rem; +} + +.x-risu-risu-inlay-image{ + @apply w-full flex justify-center +} + +.x-risu-risu-inlay-image > img{ + @apply rounded-lg focus:outline-none max-w-80 w-full +} + +.z-100{ + z-index: 100; } \ No newline at end of file diff --git a/src/ts/alert.ts b/src/ts/alert.ts index 25abb1d2..30049793 100644 --- a/src/ts/alert.ts +++ b/src/ts/alert.ts @@ -246,7 +246,7 @@ export async function alertCardExport(type:string = ''){ export async function alertTOS(){ - if(localStorage.getItem('tos') === 'true'){ + if(localStorage.getItem('tos2') === 'true'){ return true } @@ -263,7 +263,7 @@ export async function alertTOS(){ } if(get(alertStore).msg === 'yes'){ - localStorage.setItem('tos', 'true') + localStorage.setItem('tos2', 'true') return true } diff --git a/src/ts/characterCards.ts b/src/ts/characterCards.ts index ffe37d8e..dfe3deda 100644 --- a/src/ts/characterCards.ts +++ b/src/ts/characterCards.ts @@ -14,6 +14,9 @@ import { PngChunk } from "./pngChunk" import type { OnnxModelFiles } from "./process/transformers" import { CharXReader, CharXWriter } from "./process/processzip" import { Capacitor } from "@capacitor/core" +import { exportModule, readModule, type RisuModule } from "./process/modules" +import { readFile } from "@tauri-apps/plugin-fs" +import { onOpenUrl } from '@tauri-apps/plugin-deep-link'; export const hubURL = "https://sv.risuai.xyz" @@ -65,6 +68,9 @@ async function importCharacterProcess(f:{ } } + let db = get(DataBase) + db.statics.imports += 1 + if(f.name.endsWith('charx')){ console.log('reading charx') alertStore.set({ @@ -80,11 +86,18 @@ async function importCharacterProcess(f:{ alertError(language.errors.noData) return } - const card = JSON.parse(cardData) + const card:CharacterCardV3 = JSON.parse(cardData) if(CCardLib.character.check(card) !== 'v3'){ alertError(language.errors.noData) return } + if(reader.moduleData){ + const md = await readModule(Buffer.from(reader.moduleData)) + card.data.extensions ??= {} + card.data.extensions.risuai ??= {} + card.data.extensions.risuai.triggerscript = md.trigger ?? [] + card.data.extensions.risuai.customScripts = md.regex ?? [] + } await importCharacterCardSpec(card, undefined, 'normal', reader.assets) let db = get(DataBase) return db.characters.length - 1 @@ -133,7 +146,7 @@ async function importCharacterProcess(f:{ continue } if(chunk.key.startsWith('chara-ext-asset_')){ - const assetIndex = (chunk.key.replace('chara-ext-asset_', '')) + const assetIndex = chunk.key.replace('chara-ext-asset_:', '').replace('chara-ext-asset_', '') alertWait('Loading... (Reading Asset ' + assetIndex + ')' ) const assetData = Buffer.from(chunk.value, 'base64') const assetId = await saveAsset(assetData) @@ -145,7 +158,7 @@ async function importCharacterProcess(f:{ return } - if(!readedChara){ + if(readedCCv3){ readedChara = readedCCv3 } @@ -226,7 +239,6 @@ async function importCharacterProcess(f:{ const charaData:OldTavernChar = JSON.parse(Buffer.from(readedChara, 'base64').toString('utf-8')) console.log(charaData) const imgp = await saveAsset(await reencodeImage(img)) - let db = get(DataBase) db.characters.push(convertOffSpecCards(charaData, imgp)) DataBase.set(db) alertNormal(language.importedCharacter) @@ -289,6 +301,14 @@ export async function characterURLImport() { const hash = location.hash + if(hash.startsWith('#import=')){ + const url = hash.replace('#import=', '') + const res = await fetch(url, { + method: 'GET', + }) + const data = new Uint8Array(await res.arrayBuffer()) + importFile(getFileName(res), data) + } if(hash.startsWith('#import_module=')){ const data = hash.replace('#import_module=', '') const importData = JSON.parse(Buffer.from(decodeURIComponent(data), 'base64').toString('utf-8')) @@ -304,7 +324,7 @@ export async function characterURLImport() { db.modules.push(importData) setDatabase(db) alertNormal(language.successImport) - SettingsMenuIndex.set(1) + SettingsMenuIndex.set(14) settingsOpen.set(true) return } @@ -315,10 +335,148 @@ export async function characterURLImport() { name: 'imported.risupreset', data: importData }) - SettingsMenuIndex.set(14) + SettingsMenuIndex.set(1) settingsOpen.set(true) return + } + if(hash.startsWith('#share_character')){ + const data = await fetch("/sw/share/character") + if(data.status !== 200){ + return + } + const charx = new Uint8Array(await data.arrayBuffer()) + await importCharacterProcess({ + name: 'shared.charx', + data: charx + }) + } + if(hash.startsWith('#share_module')){ + const data = await fetch("/sw/share/module") + if(data.status !== 200){ + return + } + const module = new Uint8Array(await data.arrayBuffer()) + const md = await readModule(Buffer.from(module)) + md.id = v4() + const db = get(DataBase) + db.modules.push(md) + setDatabase(db) + alertNormal(language.successImport) + SettingsMenuIndex.set(14) + settingsOpen.set(true) + } + if(hash.startsWith('#share_preset')){ + const data = await fetch("/sw/share/preset") + if(data.status !== 200){ + return + } + const preset = new Uint8Array(await data.arrayBuffer()) + await importPreset({ + name: 'shared.risup', + data: preset + }) + SettingsMenuIndex.set(1) + settingsOpen.set(true) + } + if ("launchQueue" in window) { + const handleFiles = async (files:FileSystemFileHandle[]) => { + for(const f of files){ + const file = await f.getFile() + const data = new Uint8Array(await file.arrayBuffer()) + importFile(f.name, data); + } + } + //@ts-ignore + window.launchQueue.setConsumer((launchParams) => { + if (launchParams.files && launchParams.files.length) { + const files = launchParams.files as FileSystemFileHandle[] + handleFiles(files) + } + }); + } + + if("tauriOpenedFiles" in window){ + //@ts-ignore + const files:string[] = window.tauriOpenedFiles + if(files){ + for(const file of files){ + const data = await readFile(file) + importFile(file, data) + } + } + } + if(isTauri){ + await onOpenUrl((urls) => { + for(const url of urls){ + const splited = url.split('/') + const id = splited[splited.length - 1] + const type = splited[splited.length - 2] + switch(type){ + case 'realm':{ + downloadRisuHub(id) + } + } + } + }) + } + + async function importFile(name:string, data:Uint8Array) { + if(name.endsWith('.charx') || name.endsWith('.png')){ + await importCharacterProcess({ + name: name, + data: data + }) + return + } + if(name.endsWith('.risupreset') || name.endsWith('.risup')){ + await importPreset({ + name: name, + data: data + }) + SettingsMenuIndex.set(1) + settingsOpen.set(true) + alertNormal(language.successImport) + return + } + if(name.endsWith('risum')){ + const md = await readModule(Buffer.from(data)) + md.id = v4() + const db = get(DataBase) + db.modules.push(md) + setDatabase(db) + alertNormal(language.successImport) + SettingsMenuIndex.set(14) + settingsOpen.set(true) + return + } + } + + function getFileName(res : Response) : string { + return getFormContent(res.headers.get('content-disposition')) || getFromURL(res.url); + + function getFormContent(contentDisposition : string) { + if (!contentDisposition) return null; + const pattern = /filename\*=UTF-8''([^"';\n]+)|filename[^;\n=]*=["']?([^"';\n]+)["']?/; + const matches = contentDisposition.match(pattern); + if (matches) { + if (matches[1]) { + return decodeURIComponent(matches[1]); + } else if (matches[2]) { + return matches[2]; + } + } + return null; + } + + function getFromURL(url : string) : string { + try { + const path = new URL(url).pathname; + return path.substring(path.lastIndexOf('/') + 1); + } catch { + return ""; + } + } } } @@ -326,6 +484,43 @@ export async function characterURLImport() { function convertOffSpecCards(charaData:OldTavernChar|CharacterCardV2Risu, imgp:string|undefined = undefined):character{ const data = charaData.spec_version === '2.0' ? charaData.data : charaData console.log("Off spec detected, converting") + const charbook = charaData.spec_version === '2.0' ? charaData.data.character_book : null + let lorebook:loreBook[] = [] + let loresettings:undefined|loreSettings = undefined + let loreExt:undefined|any = undefined + if(charbook){ + if((!checkNullish(charbook.recursive_scanning)) && + (!checkNullish(charbook.scan_depth)) && + (!checkNullish(charbook.token_budget))){ + loresettings = { + tokenBudget:charbook.token_budget, + scanDepth:charbook.scan_depth, + recursiveScanning: charbook.recursive_scanning, + fullWordMatching: charbook?.extensions?.risu_fullWordMatching ?? false, + } + } + + loreExt = charbook.extensions + + for(const book of charbook.entries){ + lorebook.push({ + key: book.keys.join(', '), + secondkey: book.secondary_keys?.join(', ') ?? '', + insertorder: book.insertion_order, + comment: book.name ?? book.comment ?? "", + content: book.content, + mode: "normal", + alwaysActive: book.constant ?? false, + selective: book.selective ?? false, + extentions: {...book.extensions, risu_case_sensitive: book.case_sensitive}, + activationPercent: book.extensions?.risu_activationPercent, + loreCache: book.extensions?.risu_loreCache ?? null, + //@ts-ignore + useRegex: book.use_regex ?? false + }) + } + } + return { name: data.name ?? 'unknown name', firstMessage: data.first_mes ?? 'unknown first message', @@ -341,7 +536,7 @@ function convertOffSpecCards(charaData:OldTavernChar|CharacterCardV2Risu, imgp:s image: imgp, emotionImages: [], bias: [], - globalLore: [], + globalLore: lorebook, viewScreen: 'none', chaId: uuidv4(), sdData: defaultSdDataFunc(), @@ -360,7 +555,10 @@ function convertOffSpecCards(charaData:OldTavernChar|CharacterCardV2Risu, imgp:s firstMsgIndex: -1, replaceGlobalNote: "", triggerscript: [], - additionalText: '' + additionalText: '', + loreExt: loreExt, + loreSettings: loresettings, + } } @@ -663,7 +861,7 @@ async function importCharacterCardSpec(card:CharacterCardV2Risu|CharacterCardV3, alternateGreetings:data.alternate_greetings ?? [], tags:data.tags ?? [], creator:data.creator ?? '', - characterVersion: `${data.character_version}` ?? '', + characterVersion: `${data.character_version}` || '', personality:data.personality ?? '', scenario:data.scenario ?? '', firstMsgIndex: -1, @@ -775,7 +973,7 @@ async function createBaseV2(char:character) { }, tags: char.tags ?? [], creator: char.additionalData?.creator ?? '', - character_version: `${char.additionalData?.character_version}` ?? '', + character_version: `${char.additionalData?.character_version}` || '', extensions: { risuai: { // emotions: char.emotionImages, @@ -850,7 +1048,7 @@ export async function exportCharacterCard(char:character, type:'png'|'json'|'cha const b64encoded = Buffer.from(await convertImage(rData)).toString('base64') assetIndex++ card.data.extensions.risuai.emotions[i][1] = `__asset:${assetIndex}` - await writer.write("chara-ext-asset_" + assetIndex, b64encoded) + await writer.write("chara-ext-asset_:" + assetIndex, b64encoded) } } @@ -866,7 +1064,7 @@ export async function exportCharacterCard(char:character, type:'png'|'json'|'cha const b64encoded = Buffer.from(await convertImage(rData)).toString('base64') assetIndex++ card.data.extensions.risuai.additionalAssets[i][1] = `__asset:${assetIndex}` - await writer.write("chara-ext-asset_" + assetIndex, b64encoded) + await writer.write("chara-ext-asset_:" + assetIndex, b64encoded) } } @@ -882,7 +1080,7 @@ export async function exportCharacterCard(char:character, type:'png'|'json'|'cha const b64encoded = Buffer.from(rData).toString('base64') assetIndex++ card.data.extensions.risuai.vits[key] = `__asset:${assetIndex}` - await writer.write("chara-ext-asset_" + assetIndex, b64encoded) + await writer.write("chara-ext-asset_:" + assetIndex, b64encoded) } } if(type === 'json'){ @@ -923,7 +1121,7 @@ export async function exportCharacterCard(char:character, type:'png'|'json'|'cha if(type === 'png'){ const b64encoded = Buffer.from(await convertImage(rData)).toString('base64') card.data.assets[i].uri = `__asset:${assetIndex}` - await writer.write("chara-ext-asset_" + assetIndex, b64encoded) + await writer.write("chara-ext-asset_:" + assetIndex, b64encoded) } else if(type === 'json'){ const b64encoded = Buffer.from(await convertImage(rData)).toString('base64') @@ -1015,6 +1213,20 @@ export async function exportCharacterCard(char:character, type:'png'|'json'|'cha }) if(type === 'charx'){ + const md:RisuModule = { + name: `${char.name} Module`, + description: "Module for " + char.name, + id: v4(), + trigger: card.data.extensions.risuai.triggerscript ?? [], + regex: card.data.extensions.risuai.customScripts ?? [], + lorebook: char.globalLore ?? [], + } + delete card.data.extensions.risuai.triggerscript + delete card.data.extensions.risuai.customScripts + await writer.write("module.risum", await exportModule(md, { + alertEnd: false, + saveData: false + })) await writer.write("card.json", Buffer.from(JSON.stringify(card, null, 4))) } else{ @@ -1131,7 +1343,7 @@ export function createBaseV3(char:character){ }, tags: char.tags ?? [], creator: char.additionalData?.creator ?? '', - character_version: `${char.additionalData?.character_version}` ?? '', + character_version: `${char.additionalData?.character_version}` || '', extensions: { risuai: { bias: char.bias, diff --git a/src/ts/characters.ts b/src/ts/characters.ts index ac80e335..653a44bc 100644 --- a/src/ts/characters.ts +++ b/src/ts/characters.ts @@ -1,17 +1,19 @@ import { get, writable } from "svelte/store"; import { DataBase, saveImage, setDatabase, type character, type Chat, defaultSdDataFunc, type loreBook } from "./storage/database"; -import { alertConfirm, alertError, alertNormal, alertSelect, alertStore, alertWait } from "./alert"; +import { alertAddCharacter, alertConfirm, alertError, alertNormal, alertSelect, alertStore, alertWait } from "./alert"; import { language } from "../lang"; import { decode as decodeMsgpack } from "msgpackr"; import { checkNullish, findCharacterbyId, getUserName, selectMultipleFile, selectSingleFile, sleep } from "./util"; import { v4 as uuidv4 } from 'uuid'; -import { selectedCharID } from "./stores"; +import { MobileGUIStack, OpenRealmStore, selectedCharID } from "./stores"; import { checkCharOrder, downloadFile, getFileSrc } from "./storage/globalApi"; import { reencodeImage } from "./process/files/image"; import { updateInlayScreen } from "./process/inlayScreen"; import { PngChunk } from "./pngChunk"; import { parseMarkdownSafe } from "./parser"; import { translateHTML } from "./translator/translator"; +import { doingChat } from "./process"; +import { importCharacter } from "./characterCards"; export function createNewCharacter() { let db = get(DataBase) @@ -247,7 +249,7 @@ export async function exportChat(page:number){

${char.name}

${await htmlChatParse( - char.firstMsgIndex === -1 ? char.firstMessage : char.alternateGreetings?.[char.firstMsgIndex ?? 0] + chat.fmIndex === -1 ? char.firstMessage : char.alternateGreetings?.[chat.fmIndex ?? 0] )}
${chatContentHTML} @@ -341,7 +343,8 @@ export async function importChat(){ message: [], note: "", name: "Imported Chat", - localLore: [] + localLore: [], + fmIndex: -1 } let isFirst = true @@ -374,6 +377,7 @@ export async function importChat(){ if(json.type === 'risuChat' && json.ver === 1){ const das:Chat = json.data if(!(checkNullish(das.message) || checkNullish(das.note) || checkNullish(das.name) || checkNullish(das.localLore))){ + das.fmIndex ??= -1 db.characters[selectedID].chats.unshift(das) setDatabase(db) alertNormal(language.successImport) @@ -412,7 +416,9 @@ function formatTavernChat(chat:string, charName:string){ return chat.replace(/<([Uu]ser)>|\{\{([Uu]ser)\}\}/g, getUserName()).replace(/((\{\{)|<)([Cc]har)(=.+)?((\}\})|>)/g, charName) } -export function characterFormatUpdate(index:number|character){ +export function characterFormatUpdate(index:number|character, arg:{ + updateInteraction?:boolean, +} = {}){ let db = get(DataBase) let cha = typeof(index) === 'number' ? db.characters[index] : index if(cha.chats.length === 0){ @@ -504,10 +510,15 @@ export function characterFormatUpdate(index:number|character){ if(checkNullish(cha.customscript)){ cha.customscript = [] } + cha.lastInteraction = Date.now() if(typeof(index) === 'number'){ db.characters[index] = cha setDatabase(db) } + cha.chats = cha.chats.map((v) => { + v.fmIndex ??= cha.firstMsgIndex ?? -1 + return v + }) return cha } @@ -731,4 +742,52 @@ export async function removeChar(index:number,name:string, type:'normal'|'perman db.characters = chars setDatabase(db) selectedCharID.set(-1) +} + +export async function addCharacter(arg:{ + reseter?:()=>any, +} = {}){ + MobileGUIStack.set(100) + const reseter = arg.reseter ?? (() => {}) + const r = await alertAddCharacter() + if(r === 'importFromRealm'){ + selectedCharID.set(-1) + OpenRealmStore.set(true) + MobileGUIStack.set(0) + return + } + reseter(); + switch(r){ + case 'createfromScratch': + createNewCharacter() + break + case 'createGroup': + createNewGroup() + break + case 'importCharacter': + await importCharacter() + break + default: + MobileGUIStack.set(1) + return + } + let db = get(DataBase) + if(db.characters[db.characters.length-1]){ + changeChar(db.characters.length-1) + } + MobileGUIStack.set(1) +} + +export function changeChar(index: number, arg:{ + reseter?:()=>any, +} = {}) { + const reseter = arg.reseter ?? (() => {}) + if(get(doingChat)){ + return + } + reseter(); + characterFormatUpdate(index, { + updateInteraction: true, + }); + selectedCharID.set(index); } \ No newline at end of file diff --git a/src/ts/drive/backuplocal.ts b/src/ts/drive/backuplocal.ts index 6e96bba8..5921a6ac 100644 --- a/src/ts/drive/backuplocal.ts +++ b/src/ts/drive/backuplocal.ts @@ -1,11 +1,11 @@ -import { BaseDirectory, readBinaryFile, readDir, writeBinaryFile } from "@tauri-apps/api/fs"; +import { BaseDirectory, readFile, readDir, writeFile } from "@tauri-apps/plugin-fs"; import { alertError, alertNormal, alertStore, alertWait } from "../alert"; import { LocalWriter, forageStorage, isTauri } from "../storage/globalApi"; import { decodeRisuSave, encodeRisuSave } from "../storage/risuSave"; import { get } from "svelte/store"; import { DataBase } from "../storage/database"; -import { save } from "@tauri-apps/api/dialog"; -import { relaunch } from "@tauri-apps/api/process"; +import { save } from "@tauri-apps/plugin-dialog"; +import { relaunch } from "@tauri-apps/plugin-process"; import { sleep } from "../util"; import { hubURL } from "../characterCards"; @@ -41,7 +41,7 @@ export async function SaveLocalBackup(){ if(isTauri){ - const assets = await readDir('assets', {dir: BaseDirectory.AppData}) + const assets = await readDir('assets', {baseDir: BaseDirectory.AppData}) let i = 0; for(let asset of assets){ i += 1; @@ -50,7 +50,7 @@ export async function SaveLocalBackup(){ if(!key || !key.endsWith('.png')){ continue } - await writer.writeBackup(key, await readBinaryFile(asset.path)) + await writer.writeBackup(key, await readFile(asset.name, {baseDir: BaseDirectory.AppData})) } } else{ @@ -63,7 +63,7 @@ export async function SaveLocalBackup(){ if(!key || !key.endsWith('.png')){ continue } - await writer.writeBackup(key, await forageStorage.getItem(key)) + await writer.writeBackup(key, await forageStorage.getItem(key) as unknown as Uint8Array) if(forageStorage.isAccount){ await sleep(1000) } @@ -115,7 +115,7 @@ export async function LoadLocalBackup(){ const dbData = await decodeRisuSave(db) DataBase.set(dbData) if(isTauri){ - await writeBinaryFile('database/database.bin', db, {dir: BaseDirectory.AppData}) + await writeFile('database/database.bin', db, {baseDir: BaseDirectory.AppData}) relaunch() alertStore.set({ type: "wait", @@ -133,7 +133,7 @@ export async function LoadLocalBackup(){ continue } if(isTauri){ - await writeBinaryFile(`assets/` + name, data ,{dir: BaseDirectory.AppData}) + await writeFile(`assets/` + name, data ,{baseDir: BaseDirectory.AppData}) } else{ await forageStorage.setItem('assets/' + name, data) diff --git a/src/ts/drive/drive.ts b/src/ts/drive/drive.ts index 0aa4ee39..4abfa56a 100644 --- a/src/ts/drive/drive.ts +++ b/src/ts/drive/drive.ts @@ -1,10 +1,10 @@ import { get } from "svelte/store"; -import { alertError, alertErrorWait, alertInput, alertNormal, alertSelect, alertStore } from "../alert"; -import { DataBase, setDatabase, type Database } from "../storage/database"; -import { forageStorage, getUnpargeables, isNodeServer, isTauri, openURL } from "../storage/globalApi"; -import { BaseDirectory, exists, readBinaryFile, readDir, writeBinaryFile } from "@tauri-apps/api/fs"; +import { alertError, alertInput, alertNormal, alertSelect, alertStore } from "../alert"; +import { DataBase, type Database } from "../storage/database"; +import { forageStorage, getUnpargeables, isTauri, openURL } from "../storage/globalApi"; +import { BaseDirectory, exists, readFile, readDir, writeFile } from "@tauri-apps/plugin-fs"; import { language } from "../../lang"; -import { relaunch } from '@tauri-apps/api/process'; +import { relaunch } from '@tauri-apps/plugin-process'; import { isEqual } from "lodash"; import { sleep } from "../util"; import { hubURL } from "../characterCards"; @@ -112,89 +112,6 @@ let BackupDb:Database = null export async function syncDrive() { BackupDb = structuredClone(get(DataBase)) return - while(true){ - const maindb = get(DataBase) - if(maindb?.account?.data?.access_token && maindb?.account?.data?.refresh_token && maindb?.account?.data?.expires_in){ - if(maindb.account.data.expires_in < Date.now()){ - if(!maindb.account){ - alertError("Not logged in error") - return - } - const s = await fetch(hubURL + '/drive/refresh', { - method: "POST", - body: JSON.stringify({ - token: maindb.account.token - }) - }) - if(s.status !== 200){ - alertError(await s.text()) - return - } - maindb.account.data = await s.json() - } - const ACCESS_TOKEN = maindb.account.data.access_token - const d = await loadDrive(ACCESS_TOKEN, 'sync') - lastSaved = Math.floor(Date.now() / 1000) - localStorage.setItem('risu_lastsaved', `${lastSaved}`) - const hadNoSync = d === 'noSync' - if((!isEqual(maindb, BackupDb)) || hadNoSync){ - BackupDb = structuredClone(maindb) - const files:DriveFile[] = await getFilesInFolder(ACCESS_TOKEN) - const fileNames = files.map((d) => { - return d.name - }) - if(isTauri){ - const assets = await readDir('assets', {dir: BaseDirectory.AppData}) - let i = 0; - for(let asset of assets){ - i += 1; - if(hadNoSync){ - alertStore.set({ - type: "wait", - msg: `Uploading Sync Files... (${i} / ${assets.length})` - }) - } - const key = asset.name - if(!key || !key.endsWith('.png')){ - continue - } - const formatedKey = formatKeys(key) - if(!fileNames.includes(formatedKey)){ - await createFileInFolder(ACCESS_TOKEN, formatedKey, await readBinaryFile(asset.path)) - } - } - } - else{ - const keys = await forageStorage.keys() - - for(let i=0;i(); export const highlighter = (highlightDom:HTMLElement, id:number) => { - if(highlightDom){ - if(!CSS.highlights){ - return - } - - const walker = document.createTreeWalker(highlightDom, NodeFilter.SHOW_TEXT) - const nodes:Node[] = [] - let currentNode = walker.nextNode(); - while (currentNode) { - nodes.push(currentNode); - currentNode = walker.nextNode(); - } - const str = "{{char}}" - if (!str) { - return; - } - - const ranges:HighlightInt[] = [] - - nodes.map((el) => { - const text = el.textContent.toLowerCase() - - const cbsParsed = simpleCBSHighlightParser(el,text) - ranges.push(...cbsParsed) - - for(const syntax of highlighterSyntax){ - const regex = syntax.regex - let match:RegExpExecArray | null; - while ((match = regex.exec(text)) !== null) { - const length = match[0].length; - const index = match.index; - const range = new Range(); - range.setStart(el, index); - range.setEnd(el, index + length); - ranges.push([range, syntax.type]) - } + try { + + if(highlightDom){ + if(!CSS.highlights){ + return } - }); - - highLights.set(id, ranges) - - runHighlight() + + const walker = document.createTreeWalker(highlightDom, NodeFilter.SHOW_TEXT) + const nodes:Node[] = [] + let currentNode = walker.nextNode(); + while (currentNode) { + nodes.push(currentNode); + currentNode = walker.nextNode(); + } + const str = "{{char}}" + if (!str) { + return; + } + + const ranges:HighlightInt[] = [] + + nodes.map((el) => { + const text = el.textContent.toLowerCase() + + const cbsParsed = simpleCBSHighlightParser(el,text) + ranges.push(...cbsParsed) + + for(const syntax of highlighterSyntax){ + const regex = syntax.regex + let match:RegExpExecArray | null; + while ((match = regex.exec(text)) !== null) { + const length = match[0].length; + const index = match.index; + const range = new Range(); + range.setStart(el, index); + range.setEnd(el, index + length); + ranges.push([range, syntax.type]) + } + } + }); + + highLights.set(id, ranges) + + runHighlight() + } + } catch (error) { + } } @@ -80,13 +85,14 @@ export const removeHighlight = (id:number) => { } const normalCBS = [ - 'previous_char_chat', 'lastcharmessage', 'previous_user_chat', 'lastusermessage', 'char', 'bot', - 'user', 'char_persona', 'description', 'char_desc', 'example_dialogue', + 'char', 'user', 'char_persona', 'description', 'char_desc', 'example_dialogue', 'previous_char_chat', + 'lastcharmessage', 'previous_user_chat', 'lastusermessage', 'example_message', 'persona', 'user_persona', 'lorebook', 'world_info', 'history', 'messages', 'chat_index', 'first_msg_index', 'blank', 'none', 'message_time', 'message_date', 'time', 'date', 'isotime', 'isodate', 'message_idle_duration', 'idle_duration', 'br', 'newline', 'model', 'axmodel', 'role', 'jbtoggled', 'random', 'maxcontext', 'lastmessage', 'lastmessageid', - 'lastmessageindex', 'emotionlist', 'assetlist', 'prefill_supported', 'unixtime', '/', '/if', '/each', '/pure', '/if_pure', 'slot', 'module_enabled' + 'lastmessageindex', 'emotionlist', 'assetlist', 'prefill_supported', 'unixtime', 'slot', 'module_enabled', + 'is_first_message', '/', '/if', '/each', '/pure', '/if_pure', '/func', '/pure_display' ] const normalCBSwithParams = [ @@ -97,15 +103,19 @@ const normalCBSwithParams = [ 'arraypop', 'array_pop', 'arraypush', 'array_push', 'arraysplice', 'array_splice', 'makearray', 'array', 'a', 'make_array', 'history', 'messages', 'range', 'date', 'time', 'datetimeformat', 'date_time_format', 'random', 'pick', 'roll', 'datetimeformat', 'hidden_key', 'reverse', 'getglobalvar', 'position', 'slot', 'rollp', - 'and', 'or', 'not', 'message_time_array', 'filter', 'greater', 'less', 'greater_equal', 'less_equal' + 'and', 'or', 'not', 'message_time_array', 'filter', 'greater', 'less', 'greater_equal', 'less_equal', 'arg' ] const displayRelatedCBS = [ - 'raw', 'img', 'video', 'audio', 'bg', 'emotion', 'asset', 'video-img', 'comment' + 'raw', 'img', 'video', 'audio', 'bg', 'emotion', 'asset', 'video-img', 'comment', 'image' ]; +const nestedCBS = [ + '#if', '#if_pure ', '#pure ', '#each ', '#func', '#pure_display' +] + const specialCBS = [ - '#if', '#if_pure ', '#pure ', '#each ', 'random:', 'pick:', 'roll:', 'datetimeformat:', '? ', 'hidden_key: ', 'reverse: ', + 'random:', 'pick:', 'roll:', 'datetimeformat:', '? ', 'hidden_key: ', 'reverse: ', ...nestedCBS ] const deprecatedCBS = [ @@ -125,6 +135,11 @@ const decorators = [ const deprecatedDecorators = [ 'end', 'assistant', 'user', 'system' ] + +export const AllCBS = [...normalCBS, ...(normalCBSwithParams.concat(displayRelatedCBS).map((v) => { + return v + ':' +})), ...nestedCBS] + const highlighterSyntax = [ { regex: /<(char|user|bot)>/gi, diff --git a/src/ts/hotkey.ts b/src/ts/hotkey.ts index c58b9086..a39f8de3 100644 --- a/src/ts/hotkey.ts +++ b/src/ts/hotkey.ts @@ -1,7 +1,9 @@ import { get } from "svelte/store" -import { alertToast, doingAlert } from "./alert" +import { alertSelect, alertToast, doingAlert } from "./alert" import { DataBase, changeToPreset as changeToPreset2 } from "./storage/database" -import { selectedCharID, settingsOpen } from "./stores" +import { MobileGUIStack, MobileSideBar, openPersonaList, openPresetList, SafeModeStore, selectedCharID, settingsOpen } from "./stores" +import { language } from "src/lang" +import { updateTextThemeAndCSS } from "./gui/colorscheme" export function initHotkey(){ document.addEventListener('keydown', (ev) => { @@ -73,6 +75,25 @@ export function initHotkey(){ ev.stopPropagation() break } + case 'p':{ + openPresetList.set(!get(openPresetList)) + ev.preventDefault() + ev.stopPropagation() + break + } + case 'e':{ + openPersonaList.set(!get(openPersonaList)) + ev.preventDefault() + ev.stopPropagation() + break + } + case '.':{ + SafeModeStore.set(!get(SafeModeStore)) + updateTextThemeAndCSS() + ev.preventDefault() + ev.stopPropagation() + break + } } } if(ev.key === 'Escape'){ @@ -85,6 +106,93 @@ export function initHotkey(){ ev.preventDefault() } }) + + + let touchs = 0 + let touchStartTime = 0 + //check for triple touch + document.addEventListener('touchstart', async (ev) => { + touchs++ + if(touchs > 2){ + if(Date.now() - touchStartTime > 300){ + return + } + touchs = 0 + if(doingAlert()){ + return + } + const selStr = await alertSelect([ + language.presets, + language.persona, + language.cancel + ]) + const sel = parseInt(selStr) + if(sel === 0){ + openPresetList.set(!get(openPresetList)) + } + if(sel === 1){ + openPersonaList.set(!get(openPersonaList)) + } + } + if(touchs === 1){ + touchStartTime = Date.now() + } + }) + document.addEventListener('touchend', (ev) => { + touchs = 0 + }) +} + +export function initMobileGesture(){ + + let pressingPointers = new Map() + + document.addEventListener('touchstart', (ev) => { + for(const touch of ev.changedTouches){ + const ele = touch.target as HTMLElement + if(ele.tagName === 'BUTTON' || ele.tagName === 'INPUT' || ele.tagName === 'SELECT' || ele.tagName === 'TEXTAREA'){ + return + } + pressingPointers.set(touch.identifier, {x: touch.clientX, y: touch.clientY}) + } + }, { + passive: true + }) + document.addEventListener('touchend', (ev) => { + for(const touch of ev.changedTouches){ + const d = pressingPointers.get(touch.identifier) + const moveX = touch.clientX - d.x + const moveY = touch.clientY - d.y + pressingPointers.delete(touch.identifier) + + if(moveX > 50 && Math.abs(moveY) < Math.abs(moveX)){ + if(get(selectedCharID) === -1){ + if(get(MobileGUIStack) > 0){ + MobileGUIStack.update(v => v - 1) + } + } + else{ + if(get(MobileSideBar) > 0){ + MobileSideBar.update(v => v - 1) + } + } + } + else if(moveX < -50 && Math.abs(moveY) < Math.abs(moveX)){ + if(get(selectedCharID) === -1){ + if(get(MobileGUIStack) < 2){ + MobileGUIStack.update(v => v + 1) + } + } + else{ + if(get(MobileSideBar) < 3){ + MobileSideBar.update(v => v + 1) + } + } + } + } + }, { + passive: true + }) } function changeToPreset(num:number){ diff --git a/src/ts/model/names.ts b/src/ts/model/names.ts index ffc08d98..c0d1f72c 100644 --- a/src/ts/model/names.ts +++ b/src/ts/model/names.ts @@ -105,10 +105,18 @@ export function getModelName(name:string){ return 'GPT-4o ChatGPT' case 'gpt4om': return 'GPT-4o Mini' + case 'gpt4o1-preview': + return 'o1 Preview' + case 'gpt4o1-mini': + return 'o1 Mini' case 'gpt4om-2024-07-18': return 'GPT-4o Mini (2024-07-18)' case 'gemini-1.5-pro-latest': return 'Gemini 1.5 Pro' + case 'gemini-1.5-pro-exp-0801': + return 'Gemini 1.5 Pro Exp (0801)' + case 'gemini-1.5-pro-exp-0827': + return 'Gemini 1.5 Pro Exp (0827)' case 'gemini-1.5-flash': return 'Gemini 1.5 Flash' case 'ollama-hosted': diff --git a/src/ts/parser.ts b/src/ts/parser.ts index 3d4ff799..d2af1c79 100644 --- a/src/ts/parser.ts +++ b/src/ts/parser.ts @@ -4,17 +4,13 @@ import { DataBase, setDatabase, type Database, type Message, type character, typ import { getFileSrc } from './storage/globalApi'; import { processScriptFull } from './process/scripts'; import { get } from 'svelte/store'; -import css from '@adobe/css-tools' -import { CurrentCharacter, CurrentChat, SizeStore, selectedCharID } from './stores'; +import css, { type CssAtRuleAST } from '@adobe/css-tools' +import { CurrentCharacter, SizeStore, selectedCharID } from './stores'; import { calcString } from './process/infunctions'; import { findCharacterbyId, getPersonaPrompt, getUserIcon, getUserName, parseKeyValue, sfc32, sleep, uuidtoNumber } from './util'; -import { getInlayImage, writeInlayImage } from './process/files/image'; -import { getModuleLorebooks } from './process/modules'; -import { HypaProcesser } from './process/memory/hypamemory'; -import { generateAIImage } from './process/stableDiff'; -import { requestChatData } from './process/request'; +import { getInlayImage } from './process/files/image'; +import { getModuleAssets, getModuleLorebooks } from './process/modules'; import type { OpenAIChat } from './process'; -import { alertInput, alertNormal } from './alert'; import hljs from 'highlight.js/lib/core' import 'highlight.js/styles/atom-one-dark.min.css' @@ -79,11 +75,24 @@ DOMPurify.addHook("uponSanitizeAttribute", (node, data) => { function renderMarkdown(md:markdownit, data:string){ - return md.render(data.replace(/“|”/g, '"').replace(/‘|’/g, "'")) - .replace(/\uE9b0/gu, '“') - .replace(/\uE9b1/gu, '”') - .replace(/\uE9b2/gu, '‘') - .replace(/\uE9b3/gu, '’') + const db = get(DataBase) + let quotes = ['“', '”', '‘', '’'] + if(db?.customQuotes){ + quotes = db.customQuotesData ?? quotes + } + + let text = md.render(data.replace(/“|”/g, '"').replace(/‘|’/g, "'")) + + if(db?.unformatQuotes){ + text = text.replace(/\uE9b0/gu, quotes[0]).replace(/\uE9b1/gu, quotes[1]) + text = text.replace(/\uE9b2/gu, quotes[2]).replace(/\uE9b3/gu, quotes[3]) + } + else{ + text = text.replace(/\uE9b0/gu, '' + quotes[0]).replace(/\uE9b1/gu, quotes[1] + '') + text = text.replace(/\uE9b2/gu, '' + quotes[2]).replace(/\uE9b3/gu, quotes[3] + '') + } + + return text } async function renderHighlightableMarkdown(data:string) { @@ -242,7 +251,7 @@ async function renderHighlightableMarkdown(data:string) { } -export const assetRegex = /{{(raw|img|video|audio|bg|emotion|asset|video-img|source)::(.+?)}}/g +export const assetRegex = /{{(raw|path|img|image|video|audio|bg|emotion|asset|video-img|source)::(.+?)}}/g async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|character, mode:'normal'|'back', mode2:'unset'|'pre'|'post' = 'unset'){ const db = get(DataBase) @@ -273,6 +282,16 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c } } } + const moduleAssets = getModuleAssets() + if(moduleAssets.length > 0){ + for(const asset of moduleAssets){ + const assetPath = await getFileSrc(asset[1]) + assetPaths[asset[0].toLocaleLowerCase()] = { + path: assetPath, + ext: asset[2] + } + } + } const videoExtention = ['mp4', 'webm', 'avi', 'm4p', 'm4v'] let needsSourceAccess = false data = data.replaceAll(assetRegex, (full:string, type:string, name:string) => { @@ -301,15 +320,18 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c } switch(type){ case 'raw': + case 'path': return path.path case 'img': return `${path.path}` + case 'image': + return `
${path.path}
\n` case 'video': - return `` + return `\n` case 'video-img': - return `` + return `\n` case 'audio': - return `` + return `\n` case 'bg': if(mode === 'back'){ return `
` @@ -317,9 +339,9 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c break case 'asset':{ if(path.ext && videoExtention.includes(path.ext)){ - return `` + return `\n` } - return `${path.path}` + return `${path.path}\n` } } return '' @@ -365,7 +387,13 @@ export interface simpleCharacterArgument{ } -export async function ParseMarkdown(data:string, charArg:(character|simpleCharacterArgument | groupChat | string) = null, mode:'normal'|'back'|'pretranslate' = 'normal', chatID=-1) { +export async function ParseMarkdown( + data:string, + charArg:(character|simpleCharacterArgument | groupChat | string) = null, + mode:'normal'|'back'|'pretranslate' = 'normal', + chatID=-1, + cbsConditions:CbsConditions = {} +) { let firstParsed = '' const additionalAssetMode = (mode === 'back') ? 'back' : 'normal' let char = (typeof(charArg) === 'string') ? (findCharacterbyId(charArg)) : (charArg) @@ -374,7 +402,7 @@ export async function ParseMarkdown(data:string, charArg:(character|simpleCharac firstParsed = data } if(char){ - data = (await processScriptFull(char, data, 'editdisplay', chatID)).data + data = (await processScriptFull(char, data, 'editdisplay', chatID, cbsConditions)).data } if(firstParsed !== data && char && char.type !== 'group'){ data = await parseAdditionalAssets(data, char, additionalAssetMode, 'post') @@ -421,6 +449,32 @@ function encodeStyle(txt:string){ } const styleDecodeRegex = /\(.+?)\<\/risu-style\>/gms +function decodeStyleRule(rule:CssAtRuleAST){ + if(rule.type === 'rule'){ + if(rule.selectors){ + for(let i=0;i { + if(v.startsWith('.')){ + return ".x-risu-" + v.substring(1) + } + return v + }).join(' ') + + rule.selectors[i] = ".chattext " + selectors + } + } + } + } + if(rule.type === 'media' || rule.type === 'supports' || rule.type === 'document' || rule.type === 'host' || rule.type === 'container' ){ + for(let i=0;i { @@ -428,26 +482,10 @@ function decodeStyle(text:string){ const ast = css.parse(Buffer.from(txt, 'hex').toString('utf-8')) const rules = ast?.stylesheet?.rules if(rules){ - for(const rule of rules){ - - if(rule.type === 'rule'){ - if(rule.selectors){ - for(let i=0;i { - if(v.startsWith('.')){ - return ".x-risu-" + v.substring(1) - } - return v - }).join(' ') - - rule.selectors[i] = ".chattext " + selectors - } - } - } - } + for(let i=0;i${css.stringify(ast)}` @@ -594,6 +632,12 @@ type matcherArg = { text?:string, recursiveCount?:number lowLevelAccess?:boolean + cbsConditions:CbsConditions +} + +export type CbsConditions = { + firstmsg?:boolean + chatRole?:string } function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string}|null = null ):{ text:string, @@ -619,7 +663,7 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string } pointer-- } - return selchar.firstMsgIndex === -1 ? selchar.firstMessage : selchar.alternateGreetings[selchar.firstMsgIndex] + return chat.fmIndex === -1 ? selchar.firstMessage : selchar.alternateGreetings[chat.fmIndex] } case 'previous_user_chat': case 'lastusermessage':{ @@ -633,7 +677,7 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string } pointer-- } - return selchar.firstMsgIndex === -1 ? selchar.firstMessage : selchar.alternateGreetings[selchar.firstMsgIndex] + return chat.fmIndex === -1 ? selchar.firstMessage : selchar.alternateGreetings[chat.fmIndex] } return '' } @@ -764,7 +808,8 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string } case 'first_msg_index':{ const selchar = db.characters[get(selectedCharID)] - return selchar.firstMsgIndex.toString() + const chat = selchar.chats[selchar.chatPage] + return chat.fmIndex.toString() } case 'blank': case 'none':{ @@ -926,11 +971,26 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string return db.subModel } case 'role': { + if(matcherArg.cbsConditions.chatRole){ + return matcherArg.cbsConditions.chatRole + } + if(matcherArg.cbsConditions.firstmsg){ + return 'char' + } if (chatID !== -1) { const selchar = db.characters[get(selectedCharID)] return selchar.chats[selchar.chatPage].message[chatID].role; } - return matcherArg.role ?? 'role' + return matcherArg.role ?? 'null' + } + case 'isfirstmsg': + case 'is_first_msg': + case 'is_first_message': + case 'isfirstmessage':{ + if(matcherArg.cbsConditions.firstmsg){ + return '1' + } + return '0' } case 'jbtoggled':{ return db.jailbreakToggle ? '1' : '0' @@ -1174,6 +1234,16 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string case 'object_element':{ return parseDict(arra[1])[arra[2]] ?? 'null' } + case 'object_assert': + case 'dict_assert': + case 'dictassert': + case 'objectassert':{ + const dict = parseDict(arra[1]) + if(!dict[arra[2]]){ + dict[arra[2]] = arra[3] + } + return JSON.stringify(dict) + } case 'element': case 'ele':{ @@ -1218,6 +1288,15 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string arr.splice(Number(arra[2]), Number(arra[3]), arra[4]) return makeArray(arr) } + case 'arrayassert': + case 'array_assert':{ + const arr = parseArray(arra[1]) + const index = Number(arra[2]) + if(index >= arr.length){ + arr[index] = arra[3] + } + return makeArray(arr) + } case 'makearray': case 'array': case 'a': @@ -1232,11 +1311,6 @@ function basicMatcher (p1:string,matcherArg:matcherArg,vars:{[key:string]:string case 'object': case 'o': case 'make_object':{ - //ideas: - // - {{o::key1:value1::key2:value2}} - its confusing for users - // - {{o::key1:value1,key2:value2}} - since comma can break the parser, this is not good - // - {{o::key=value::key2=value2}} - this is good enough I think, just need to escape the equal sign - const sliced = arra.slice(1) let out = {} @@ -1600,7 +1674,7 @@ const legacyBlockMatcher = (p1:string,matcherArg:matcherArg) => { return null } -type blockMatch = 'ignore'|'parse'|'nothing'|'parse-pure'|'pure'|'each' +type blockMatch = 'ignore'|'parse'|'nothing'|'parse-pure'|'pure'|'each'|'function'|'pure-display' function parseArray(p1:string):string[]{ try { @@ -1643,14 +1717,18 @@ function blockStartMatcher(p1:string,matcherArg:matcherArg):{type:blockMatch,typ if(p1 === '#pure'){ return {type:'pure'} } + if(p1 === '#pure_display' || p1 === '#puredisplay'){ + return {type:'pure-display'} + } if(p1.startsWith('#each')){ return {type:'each',type2:p1.substring(5).trim()} } if(p1.startsWith('#func')){ const statement = p1.split(' ') - if(matcherArg.funcName === statement[1]){ - return {type:'parse',funcArg:statement.slice(2)} + if(statement.length > 1){ + return {type:'function',funcArg:statement.slice(1)} } + } @@ -1666,7 +1744,9 @@ function trimLines(p1:string){ function blockEndMatcher(p1:string,type:{type:blockMatch,type2?:string},matcherArg:matcherArg):string{ switch(type.type){ case 'pure': - case 'parse-pure':{ + case 'parse-pure': + case 'pure-display': + case 'function':{ return p1 } case 'parse': @@ -1690,6 +1770,9 @@ export function risuChatParser(da:string, arg:{ visualize?:boolean, role?:string runVar?:boolean + functions?:Map + callStack?:number + cbsConditions?:CbsConditions } = {}):string{ const chatID = arg.chatID ?? -1 const db = arg.db ?? get(DataBase) @@ -1699,9 +1782,14 @@ export function risuChatParser(da:string, arg:{ if(aChara){ if(typeof(aChara) !== 'string' && aChara.type === 'group'){ - const gc = findCharacterbyId(aChara.chats[aChara.chatPage].message.at(-1).saying ?? '') - if(gc.name !== 'Unknown Character'){ - chara = gc + if(aChara.chats[aChara.chatPage].message.length > 0){ + const gc = findCharacterbyId(aChara.chats[aChara.chatPage].message.at(-1).saying ?? '') + if(gc.name !== 'Unknown Character'){ + chara = gc + } + } + else{ + chara = 'bot' } } else{ @@ -1722,12 +1810,20 @@ export function risuChatParser(da:string, arg:{ let stackType = new Uint8Array(512) let pureModeNest:Map = new Map() let pureModeNestType:Map = new Map() - let blockNestType:Map = new Map() + let blockNestType:Map = new Map() let commentMode = false let commentLatest:string[] = [""] let commentV = new Uint8Array(512) let thinkingMode = false let tempVar:{[key:string]:string} = {} + let functions:Map = arg.functions ?? (new Map()) const matcherObj = { chatID: chatID, @@ -1740,6 +1836,7 @@ export function risuChatParser(da:string, arg:{ role: arg.role, runVar: arg.runVar ?? false, consistantChar: arg.consistantChar ?? false, + cbsConditions: arg.cbsConditions ?? {} } @@ -1808,7 +1905,10 @@ export function risuChatParser(da:string, arg:{ nested.unshift('') stackType[nested.length] = 5 blockNestType.set(nested.length, matchResult) - if(matchResult.type === 'ignore' || matchResult.type === 'pure' || matchResult.type === 'each'){ + if( matchResult.type === 'ignore' || matchResult.type === 'pure' || + matchResult.type === 'each' || matchResult.type === 'function' || + matchResult.type === 'pure-display' + ){ pureModeNest.set(nested.length, true) pureModeNestType.set(nested.length, "block") } @@ -1818,7 +1918,10 @@ export function risuChatParser(da:string, arg:{ if(dat.startsWith('/')){ if(stackType[nested.length] === 5){ const blockType = blockNestType.get(nested.length) - if(blockType.type === 'ignore' || blockType.type === 'pure' || blockType.type === 'each'){ + if( blockType.type === 'ignore' || blockType.type === 'pure' || + blockType.type === 'each' || blockType.type === 'function' || + blockType.type === 'pure-display' + ){ pureModeNest.delete(nested.length) pureModeNestType.delete(nested.length) } @@ -1837,6 +1940,18 @@ export function risuChatParser(da:string, arg:{ da = da.substring(0, pointer + 1) + added.trim() + da.substring(pointer + 1) break } + if(blockType.type === 'function'){ + console.log(matchResult) + functions.set(blockType.funcArg[0], { + data: matchResult, + arg: blockType.funcArg.slice(1) + }) + break + } + if(blockType.type === 'pure-display'){ + nested[0] += matchResult.replaceAll('{{', '\\{\\{').replaceAll('}}', '\\}\\}') + break + } if(matchResult === ''){ break } @@ -1849,6 +1964,26 @@ export function risuChatParser(da:string, arg:{ break } } + if(dat.startsWith('call::')){ + if(arg.callStack && arg.callStack > 10){ + nested[0] += `ERROR: Call stack limit reached` + break + } + const argData = dat.split('::').slice(1) + const funcName = argData[0] + const func = functions.get(funcName) + console.log(func) + if(func){ + let data = func.data + for(let i = 0;i < argData.length;i++){ + data = data.replaceAll(`{{arg::${i}}}`, argData[i]) + } + arg.functions = functions + arg.callStack = (arg.callStack ?? 0) + 1 + nested[0] += risuChatParser(data, arg) + break + } + } const mc = isPureMode() ? null :basicMatcher(dat, matcherObj, tempVar) if(!mc && mc !== ''){ nested[0] += `{{${dat}}}` @@ -1965,424 +2100,6 @@ export function risuChatParser(da:string, arg:{ return nested[0] + result } -export async function commandMatcher(p1:string,matcherArg:matcherArg,vars:{[key:string]:string}):Promise<{ - text:string, - var:{[key:string]:string} -}|void|null> { - const arra = p1.split('::') - - switch(arra[0]){ - case 'pushchat': - case 'addchat': - case 'add_chat': - case 'push_chat':{ - const chat = get(CurrentChat) - chat.message.push({role: arra[1] === 'user' ? 'user' : 'char', data: arra[2] ?? ''}) - CurrentChat.set(chat) - return { - text: '', - var: vars - } - } - case 'yield':{ - vars['__return__'] = (vars['__return__'] ?? '') + arra[1] - return { - text: '', - var: vars - } - } - case 'setchat': - case 'set_chat':{ - const chat = get(CurrentChat) - const message = chat.message?.at(Number(arra[1])) - if(message){ - message.data = arra[2] ?? '' - } - CurrentChat.set(chat) - } - case 'set_chat_role': - case 'setchatrole':{ - const chat = get(CurrentChat) - const message = chat.message?.at(Number(arra[1])) - if(message){ - message.role = arra[2] === 'user' ? 'user' : 'char' - } - CurrentChat.set(chat) - } - case 'cutchat': - case 'cut_chat':{ - const chat = get(CurrentChat) - chat.message = chat.message.slice(Number(arra[1]), Number(arra[2])) - CurrentChat.set(chat) - return { - text: '', - var: vars - } - } - case 'insertchat': - case 'insert_chat':{ - const chat = get(CurrentChat) - chat.message.splice(Number(arra[1]), 0, {role: arra[2] === 'user' ? 'user' : 'char', data: arra[3] ?? ''}) - CurrentChat.set(chat) - return { - text: '', - var: vars - } - } - case 'removechat': - case 'remove_chat':{ - const chat = get(CurrentChat) - chat.message.splice(Number(arra[1]), 1) - CurrentChat.set(chat) - return { - text: '', - var: vars - } - } - case 'regex':{ - const reg = new RegExp(arra[1], arra[2]) - const match = reg.exec(arra[3]) - let res:string[] = [] - for(let i = 0;i < match.length;i++){ - res.push(match[i]) - } - return { - text: makeArray(res), - var: vars - } - } - case 'replace_regex': - case 'replaceregex':{ - const reg = new RegExp(arra[1], arra[2]) - return { - text: arra[3].replace(reg, arra[4]), - var: vars - } - } - case 'call':{ - //WIP - const called = await risuCommandParser(arra[1], { - db: matcherArg.db, - chara: matcherArg.chara, - funcName: arra[2], - passed: arra.slice(3), - recursiveCount: (matcherArg.recursiveCount ?? 0) + 1 - }) - - return { - text: called['__return__'] ?? '', - var: vars - } - } - case 'stop_chat':{ - vars['__stop_chat__'] = '1' - return { - text: '', - var: vars - } - } - case 'similaritysearch': - case 'similarity_search': - case 'similarity':{ - if(!matcherArg.lowLevelAccess){ - return { - text: '', - var: vars - } - } - const processer = new HypaProcesser('MiniLM') - const source = arra[1] - const target = parseArray(arra[2]) - await processer.addText(target) - const result = await processer.similaritySearch(source) - return { - text: makeArray(result), - var: vars - } - } - case 'image_generation': - case 'imagegeneration': - case 'imagegen': - case 'image_gen':{ - if(!matcherArg.lowLevelAccess){ - return { - text: '', - var: vars - } - } - const prompt = arra[1] - const negative = arra[2] || '' - const char = matcherArg.chara - - const gen = await generateAIImage(prompt, char as character, negative, 'inlay') - if(!gen){ - return { - text: 'ERROR: Image generation failed', - var: vars - } - } - const imgHTML = new Image() - imgHTML.src = gen - const inlay = await writeInlayImage(imgHTML) - return { - text: inlay, - var: vars - } - } - case 'send_llm': - case 'llm':{ - if(!matcherArg.lowLevelAccess){ - return { - text: '', - var: vars - } - } - const prompt = parseArray(arra[1]) - let promptbody:OpenAIChat[] = prompt.map((f) => { - const dict = parseDict(f) - let role:'system'|'user'|'assistant' = 'assistant' - switch(dict['role']){ - case 'system': - case 'sys': - role = 'system' - break - case 'user': - role = 'user' - break - case 'assistant': - case 'bot': - case 'char':{ - role = 'assistant' - break - } - } - - return { - content: dict['content'] ?? '', - role: role, - } - }) - const result = await requestChatData({ - formated: promptbody, - bias: {}, - useStreaming: false, - noMultiGen: true, - }, 'model') - - if(result.type === 'fail'){ - return { - text: 'ERROR: ' + result.result, - var: vars - } - } - - if(result.type === 'streaming' || result.type === 'multiline'){ - return { - text: 'ERROR: Streaming and multiline is not supported in this context', - var: vars - } - } - - return { - text: result.result, - var: vars - } - } - case 'alert':{ - alertNormal(arra[1]) - return { - text: '', - var: vars - } - } - case 'input': - case 'alert_input': - case 'alertinput':{ - const input = await alertInput(arra[1]) - return { - text: input, - var: vars - } - } - } - - const matched = basicMatcher(p1, matcherArg) - if(typeof(matched) === 'string'){ - return { - text: matched, - var: vars - } - } - - return matched -} - - -export async function risuCommandParser(da:string, arg:{ - db?:Database - chara?:string|character|groupChat - funcName?:string - passed?:string[], - recursiveCount?:number - lowLevelAccess?:boolean -} = {}):Promise<{[key:string]:string}>{ - const db = arg.db ?? get(DataBase) - const aChara = arg.chara - let chara:character|string = null - let passed = arg.passed ?? [] - let recursiveCount = arg.recursiveCount ?? 0 - - if(recursiveCount > 30){ - return {} - } - - if(aChara){ - if(typeof(aChara) !== 'string' && aChara.type === 'group'){ - const gc = findCharacterbyId(aChara.chats[aChara.chatPage].message.at(-1).saying ?? '') - if(gc.name !== 'Unknown Character'){ - chara = gc - } - } - else{ - chara = aChara - } - } - - let pointer = 0; - let nested:string[] = [""] - let stackType = new Uint8Array(512) - let pureModeNest:Map = new Map() - let pureModeNestType:Map = new Map() - let blockNestType:Map = new Map() - const matcherObj = { - chatID: -1, - chara: chara, - rmVar: false, - db: db, - var: null, - tokenizeAccurate: false, - displaying: false, - role: null, - runVar: false, - consistantChar: false, - funcName: arg.funcName ?? null, - text: da, - recursiveCount: recursiveCount, - lowLevelAccess: arg.lowLevelAccess ?? false - } - - let tempVar:{[key:string]:string} = {} - - const isPureMode = () => { - return pureModeNest.size > 0 - } - while(pointer < da.length){ - switch(da[pointer]){ - case '{':{ - if(da[pointer + 1] !== '{' && da[pointer + 1] !== '#'){ - nested[0] += da[pointer] - break - } - pointer++ - nested.unshift('') - stackType[nested.length] = 1 - break - } - case '}':{ - if(da[pointer + 1] !== '}' || nested.length === 1 || stackType[nested.length] !== 1){ - nested[0] += da[pointer] - break - } - pointer++ - const dat = nested.shift() - if(dat.startsWith('#')){ - if(isPureMode()){ - nested[0] += `{{${dat}}}` - nested.unshift('') - stackType[nested.length] = 6 - break - } - const matchResult = blockStartMatcher(dat, matcherObj) - if(matchResult.type === 'nothing'){ - nested[0] += `{{${dat}}}` - break - } - else{ - nested.unshift('') - stackType[nested.length] = 5 - blockNestType.set(nested.length, matchResult) - if(matchResult.type === 'ignore' || matchResult.type === 'pure' || matchResult.type === 'each'){ - pureModeNest.set(nested.length, true) - pureModeNestType.set(nested.length, "block") - } - if(matchResult.funcArg){ - for(let i = 0;i < matchResult.funcArg.length;i++){ - tempVar[matchResult.funcArg[i]] = passed[i] - } - } - break - } - } - if(dat.startsWith('/')){ - if(stackType[nested.length] === 5){ - const blockType = blockNestType.get(nested.length) - if(blockType.type === 'ignore' || blockType.type === 'pure' || blockType.type === 'each'){ - pureModeNest.delete(nested.length) - pureModeNestType.delete(nested.length) - } - blockNestType.delete(nested.length) - const dat2 = nested.shift() - const matchResult = blockEndMatcher(dat2.trim(), blockType, matcherObj) - if(blockType.type === 'each'){ - const subind = blockType.type2.lastIndexOf(' ') - const sub = blockType.type2.substring(subind + 1) - const array = parseArray(blockType.type2.substring(0, subind)) - let added = '' - for(let i = 0;i < array.length;i++){ - const res = matchResult.replaceAll(`{{slot::${sub}}}`, array[i]) - added += res - } - da = da.substring(0, pointer + 1) + added.trim() + da.substring(pointer + 1) - break - } - if(matchResult === ''){ - break - } - nested[0] += matchResult - break - } - if(stackType[nested.length] === 6){ - const sft = nested.shift() - nested[0] += sft + `{{${dat}}}` - break - } - } - const mc = isPureMode() ? { - text:null, - var:tempVar - } : (await commandMatcher(dat, matcherObj, tempVar)) - if(mc && (mc.text || mc.text === '')){ - tempVar = mc.var - if(tempVar['__force_return__']){ - return tempVar - } - nested[0] += mc.text ?? `{{${dat}}}` - } - else{ - nested[0] += `{{${dat}}}` - } - break - } - default:{ - nested[0] += da[pointer] - break - } - } - pointer++ - } - return tempVar - -} export function getChatVar(key:string){ diff --git a/src/ts/process/cipherChat.ts b/src/ts/process/cipherChat.ts deleted file mode 100644 index ad37eaf9..00000000 --- a/src/ts/process/cipherChat.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { OpenAIChat } from "."; - - -let lastShift = 0 - -const cipher:'caesar'|'base64' = 'caesar' - -export function cipherChat(chat: OpenAIChat[]): OpenAIChat[] { - - const shift = Math.floor(Math.random() * 26) + 1 - lastShift = shift - - for(let i = 0; i < chat.length; i++){ - chat[i].content = ciphers[cipher].encode(chat[i].content, shift) - } - - chat.unshift({ - content: ciphers[cipher].prompt.replace("${shift}", shift.toString()), - role: 'system' - }) - return chat - -} - - -export function decipherChat(chat: string): string { - return ciphers[cipher].decode(chat, lastShift) -} - -//Caesar Chiper -const caesarCipher = (text: string, shift: number) => { - return text - .split('') - .map(char => { - const code = char.charCodeAt(0) - if ((code >= 65) && (code <= 90)) { - return String.fromCharCode(((code - 65 + shift) % 26) + 65) - } else if ((code >= 97) && (code <= 122)) { - return String.fromCharCode(((code - 97 + shift) % 26) + 97) - } else { - return char - } - }) - .join('') -} - -const caesarDecipher = (text: string, shift: number) => { - return text - .split('') - .map(char => { - const code = char.charCodeAt(0) - if ((code >= 65) && (code <= 90)) { - const shifted = (code - 65 - shift) - if(shifted < 0){ - return String.fromCharCode(((code - 65 - shift + 26) % 26) + 65) - } - return String.fromCharCode(((code - 65 - shift) % 26) + 65) - } else if ((code >= 97) && (code <= 122)) { - const shifted = (code - 97 - shift) - if(shifted < 0){ - return String.fromCharCode(((code - 97 - shift + 26) % 26) + 97) - } - return String.fromCharCode(((code - 97 - shift) % 26) + 97) - } else { - return char - } - }) - .join('') -} - -const base64Encode = (text: string) => { - return Buffer.from(text).toString('base64') -} - -const base64Decode = (text: string) => { - return Buffer.from(text, 'base64').toString('ascii') -} - - -const ciphers = { - caesar: { - encode: caesarCipher, - decode: caesarDecipher, - prompt: "You are an expert on The Caesar Cipher. We will communicate in Caesar Cipher. Do not be a translator. We are using shift ${shift}" - }, - base64: { - encode: base64Encode, - decode: base64Decode, - prompt: "You are an expert on The Base64 Cipher. We will communicate in Base64. Do not be a translator." - } -} \ No newline at end of file diff --git a/src/ts/process/index.ts b/src/ts/process/index.ts index 483da9a8..18ad7ac1 100644 --- a/src/ts/process/index.ts +++ b/src/ts/process/index.ts @@ -17,10 +17,9 @@ import { groupOrder } from "./group"; import { runTrigger } from "./triggers"; import { HypaProcesser } from "./memory/hypamemory"; import { additionalInformations } from "./embedding/addinfo"; -import { cipherChat, decipherChat } from "./cipherChat"; import { getInlayImage, supportsInlayImage } from "./files/image"; import { getGenerationModelString } from "./models/modelString"; -import { sendPeerChar } from "../sync/multiuser"; +import { connectionOpen, peerRevertChat, peerSafeCheck, peerSync } from "../sync/multiuser"; import { runInlayScreen } from "./inlayScreen"; import { runCharacterJS } from "../plugins/embedscript"; import { addRerolls } from "./prereroll"; @@ -56,8 +55,15 @@ export interface OpenAIChatFull extends OpenAIChat{ export const doingChat = writable(false) export const chatProcessStage = writable(0) export const abortChat = writable(false) +export let previewFormated:OpenAIChat[] = [] -export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:number,signal?:AbortSignal,continue?:boolean,usedContinueTokens?:number} = {}):Promise { +export async function sendChat(chatProcessIndex = -1,arg:{ + chatAdditonalTokens?:number, + signal?:AbortSignal, + continue?:boolean, + usedContinueTokens?:number, + preview?:boolean +} = {}):Promise { chatProcessStage.set(0) const abortSignal = arg.signal ?? (new AbortController()).signal @@ -101,9 +107,24 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n } doingChat.set(true) + if(connectionOpen){ + chatProcessStage.set(4) + const peerSafe = await peerSafeCheck() + if(!peerSafe){ + peerRevertChat() + doingChat.set(false) + alertError(language.otherUserRequesting) + return false + } + await peerSync() + chatProcessStage.set(0) + } + let db = get(DataBase) + db.statics.messages += 1 let selectedChar = get(selectedCharID) const nowChatroom = db.characters[selectedChar] + nowChatroom.lastInteraction = Date.now() let selectedChat = nowChatroom.chatPage nowChatroom.chats[nowChatroom.chatPage].message = nowChatroom.chats[nowChatroom.chatPage].message.map((v) => { v.chatId = v.chatId ?? v4() @@ -591,7 +612,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n } if(nowChatroom.type !== 'group'){ - const firstMsg = nowChatroom.firstMsgIndex === -1 ? nowChatroom.firstMessage : nowChatroom.alternateGreetings[nowChatroom.firstMsgIndex] + const firstMsg = currentChat.fmIndex === -1 ? nowChatroom.firstMessage : nowChatroom.alternateGreetings[currentChat.fmIndex] const chat:OpenAIChat = { role: 'assistant', @@ -623,7 +644,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n let index = 0 for(const msg of ms){ - let formatedChat = await processScript(nowChatroom,risuChatParser(msg.data, {chara: currentChar, role: msg.role}), 'editprocess') + let formatedChat = await processScript(nowChatroom,risuChatParser(msg.data, {chara: currentChar, role: msg.role}), 'editprocess', { + chatRole: msg.role, + }) let name = '' if(msg.role === 'char'){ if(msg.saying){ @@ -676,10 +699,25 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n } let attr:string[] = [] + let role:'user'|'assistant'|'system' = msg.role === 'user' ? 'user' : 'assistant' - if(nowChatroom.type === 'group' || (usingPromptTemplate && db.promptSettings.sendName)){ - formatedChat = name + ': ' + formatedChat - attr.push('nameAdded') + if( + (nowChatroom.type === 'group' && findCharacterbyIdwithCache(msg.saying).chaId !== currentChar.chaId) || + (nowChatroom.type === 'group' && db.groupOtherBotRole === 'assistant') || + (usingPromptTemplate && db.promptSettings.sendName) + ){ + const form = db.groupTemplate || `<{{char}}\'s Message>\n{{slot}}\n` + formatedChat = risuChatParser(form, {chara: findCharacterbyIdwithCache(msg.saying).name}).replace('{{slot}}', formatedChat) + switch(db.groupOtherBotRole){ + case 'user': + case 'assistant': + case 'system': + role = db.groupOtherBotRole + break + default: + role = 'assistant' + break + } } if(usingPromptTemplate && db.promptSettings.maxThoughtTagDepth !== -1){ const depth = ms.length - index @@ -689,7 +727,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n } const chat:OpenAIChat = { - role: msg.role === 'user' ? 'user' : 'assistant', + role: role, content: formatedChat, memo: msg.chatId, attr: attr, @@ -702,6 +740,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n currentTokens += await tokenizer.tokenizeChat(chat) index++ } + console.log(JSON.stringify(chats, null, 2)) const depthPrompts = lorepmt.actives.filter(v => { return (v.pos === 'depth' && v.depth > 0) || v.pos === 'reverse_depth' @@ -779,7 +818,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n } let biases:[string,number][] = db.bias.concat(currentChar.bias).map((v) => { - return [risuChatParser(v[0].replaceAll("\\n","\n"), {chara: currentChar}),v[1]] + return [risuChatParser(v[0].replaceAll("\\n","\n").replaceAll("\\r","\r").replaceAll("\\\\","\\"), {chara: currentChar}),v[1]] }) let memories:OpenAIChat[] = [] @@ -1027,10 +1066,6 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n return v }) - if(db.cipherChat){ - formated = cipherChat(formated) - } - if(currentChar.depth_prompt && currentChar.depth_prompt.prompt && currentChar.depth_prompt.prompt.length > 0){ //depth_prompt @@ -1090,6 +1125,11 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n maxContext: maxContextTokens, } chatProcessStage.set(3) + if(arg.preview){ + previewFormated = formated + return true + } + const req = await requestChatData({ formated: formated, biasString: biases, @@ -1140,9 +1180,6 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n if(!result){ result = '' } - if(db.cipherChat){ - result = decipherChat(result) - } if(db.removeIncompleteResponse){ result = trimUntilPunctuation(result) } @@ -1181,7 +1218,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n db.characters[selectedChar].chats[selectedChat] = currentChat setDatabase(db) } - await sayTTS(currentChar, result) + if(db.ttsAutoSpeech){ + await sayTTS(currentChar, result) + } } else{ const msgs = (req.type === 'success') ? [['char',req.result]] as const @@ -1191,9 +1230,6 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n for(let i=0;i { const sliced = messages.slice(messages.length - arg.searchDepth,messages.length) arg.keys = arg.keys.map(key => key.trim()).filter(key => key.length > 0) let mText = sliced.map((msg) => { return msg.data }).join('||') + if(arg.recursiveAdditionalPrompt){ + mText += arg.recursiveAdditionalPrompt + } if(arg.regex){ for(const regexString of arg.keys){ if(!regexString.startsWith('/')){ @@ -284,11 +288,13 @@ export async function loadLoreBookV3Prompt(){ pos:string, prompt:string role:'system'|'user'|'assistant' - priority:number + order:number tokens:number + priority:number }[] = [] let activatedIndexes:number[] = [] let disabledUIPrompts:string[] = [] + let matchTimes = 0 while(matching){ matching = false for(let i=0;i { + return b.order - a.order + }) + return { - actives: activesFiltered.reverse() + actives: activesResorted.reverse() } } diff --git a/src/ts/process/lua.ts b/src/ts/process/lua.ts index 60b7694d..a48d4903 100644 --- a/src/ts/process/lua.ts +++ b/src/ts/process/lua.ts @@ -1,8 +1,8 @@ -import { getChatVar, risuChatParser, setChatVar, type simpleCharacterArgument } from "../parser"; +import { getChatVar, hasher, risuChatParser, setChatVar, type simpleCharacterArgument } from "../parser"; import { LuaEngine, LuaFactory } from "wasmoon"; import { DataBase, setDatabase, type Chat, type character, type groupChat } from "../storage/database"; import { get } from "svelte/store"; -import { CurrentCharacter, CurrentChat, CurrentVariablePointer, ReloadGUIPointer, selectedCharID } from "../stores"; +import { CurrentCharacter, CurrentChat, ReloadGUIPointer, selectedCharID } from "../stores"; import { alertError, alertInput, alertNormal } from "../alert"; import { HypaProcesser } from "./memory/hypamemory"; import { generateAIImage } from "./stableDiff"; @@ -104,6 +104,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) const message = chat.message?.at(index) if(message){ message.data = value @@ -114,6 +115,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) const message = chat.message?.at(index) if(message){ message.role = value === 'user' ? 'user' : 'char' @@ -124,6 +126,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) chat.message = chat.message.slice(start,end) CurrentChat.set(chat) }) @@ -131,6 +134,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) chat.message.splice(index, 1) CurrentChat.set(chat) }) @@ -138,6 +142,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) let roleData:'user'|'char' = role === 'user' ? 'user' : 'char' chat.message.push({role: roleData, data: value}) CurrentChat.set(chat) @@ -146,6 +151,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) let roleData:'user'|'char' = role === 'user' ? 'user' : 'char' chat.message.splice(index, 0, {role: roleData, data: value}) CurrentChat.set(chat) @@ -154,6 +160,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) chat.message.splice(index, 1) CurrentChat.set(chat) }) @@ -161,9 +168,11 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) return chat.message.length }) luaEngine.global.set('getFullChatMain', (id:string) => { + chat = get(CurrentChat) const data = JSON.stringify(chat.message.map((v) => { return { role: v.role, @@ -178,6 +187,7 @@ export async function runLua(code:string, arg:{ if(!LuaSafeIds.has(id)){ return } + chat = get(CurrentChat) chat.message = realValue.map((v) => { return { role: v.role, @@ -222,6 +232,10 @@ export async function runLua(code:string, arg:{ return `{{inlay::${inlay}}}` }) + luaEngine.global.set('hash', async (id:string, value:string) => { + return await hasher(new TextEncoder().encode(value)) + }) + luaEngine.global.set('LLMMain', async (id:string, promptStr:string) => { let prompt:{ role: string, diff --git a/src/ts/process/models/local.ts b/src/ts/process/models/local.ts index d68a34db..5342ef2d 100644 --- a/src/ts/process/models/local.ts +++ b/src/ts/process/models/local.ts @@ -1,12 +1,11 @@ -import { invoke } from "@tauri-apps/api/tauri"; +import { invoke } from "@tauri-apps/api/core"; import { globalFetch } from "src/ts/storage/globalApi"; import { sleep } from "src/ts/util"; import * as path from "@tauri-apps/api/path"; -import { exists, readTextFile } from "@tauri-apps/api/fs"; +import { exists, readTextFile } from "@tauri-apps/plugin-fs"; import { alertClear, alertError, alertMd, alertWait } from "src/ts/alert"; import { get } from "svelte/store"; import { DataBase } from "src/ts/storage/database"; -import { resolveResource } from '@tauri-apps/api/path' let serverRunning = false; export function checkLocalModel():Promise{ diff --git a/src/ts/process/modules.ts b/src/ts/process/modules.ts index 7965fb37..a7b9c198 100644 --- a/src/ts/process/modules.ts +++ b/src/ts/process/modules.ts @@ -1,12 +1,16 @@ import { language } from "src/lang" -import { alertConfirm, alertError, alertModuleSelect, alertNormal } from "../alert" +import { alertConfirm, alertError, alertModuleSelect, alertNormal, alertStore } from "../alert" import { DataBase, setDatabase, type customscript, type loreBook, type triggerscript } from "../storage/database" -import { downloadFile } from "../storage/globalApi" +import { AppendableBuffer, downloadFile, isNodeServer, isTauri, readImage, saveAsset } from "../storage/globalApi" import { get } from "svelte/store" import { CurrentCharacter, CurrentChat } from "../stores" -import { selectSingleFile } from "../util" +import { selectSingleFile, sleep } from "../util" import { v4 } from "uuid" import { convertExternalLorebook } from "./lorebook" +import { encode } from "msgpackr" +import { decodeRPack, encodeRPack } from "../rpack/rpack_bg" +import { convertImage } from "../parser" +import { Capacitor } from "@capacitor/core" export interface RisuModule{ name: string @@ -19,25 +23,171 @@ export interface RisuModule{ lowLevelAccess?: boolean hideIcon?: boolean backgroundEmbedding?:string + assets?:[string,string,string][] + namespace?:string } -export async function exportModule(module:RisuModule){ - await downloadFile(module.name + '.json', JSON.stringify({ - ...module, +export async function exportModule(module:RisuModule, arg:{ + alertEnd?:boolean + saveData?:boolean +} = {}){ + const alertEnd = arg.alertEnd ?? true + const saveData = arg.saveData ?? true + const apb = new AppendableBuffer() + const writeLength = (len:number) => { + const lenbuf = Buffer.alloc(4) + lenbuf.writeUInt32LE(len, 0) + apb.append(lenbuf) + } + const writeByte = (byte:number) => { + //byte is 0-255 + const buf = Buffer.alloc(1) + buf.writeUInt8(byte, 0) + apb.append(buf) + } + + const assets = module.assets ?? [] + module = structuredClone(module) + module.assets ??= [] + module.assets = module.assets.map((asset) => { + return [asset[0], '', asset[2]] as [string,string,string] + }) + + const mainbuf = await encodeRPack(Buffer.from(JSON.stringify({ + module: module, type: 'risuModule' - }, null, 2)) - alertNormal(language.successExport) + }, null, 2), 'utf-8')) + + writeByte(111) //magic number + writeByte(0) //version + writeLength(mainbuf.length) + apb.append(mainbuf) + + for(let i=0;i { + let pos = 0 + + const readLength = () => { + const len = buf.readUInt32LE(pos) + pos += 4 + return len + } + const readByte = () => { + const byte = buf.readUInt8(pos) + pos += 1 + return byte + } + const readData = (len:number) => { + const data = buf.subarray(pos, pos + len) + pos += len + return data + } + + if(readByte() !== 111){ + console.error("Invalid magic number") + alertError(language.errors.noData) + return + } + if(readByte() !== 0){ //Version check + console.error("Invalid version") + alertError(language.errors.noData) + return + } + + const mainLen = readLength() + const mainData = readData(mainLen) + const main:{ + type:'risuModule' + module:RisuModule + } = JSON.parse(Buffer.from(await decodeRPack(mainData)).toString()) + + if(main.type !== 'risuModule'){ + console.error("Invalid module type") + alertError(language.errors.noData) + return + } + + let module = main.module + + let i = 0 + while(true){ + const mark = readByte() + if(mark === 0){ + break + } + if(mark !== 1){ + alertError(language.errors.noData) + return + } + const len = readLength() + const data = readData(len) + module.assets[i][1] = await saveAsset(Buffer.from(await decodeRPack(data))) + alertStore.set({ + type: 'wait', + msg: `Loading... (Adding Assets ${i} / ${module.assets.length})` + }) + if(!isTauri && !Capacitor.isNativePlatform() &&!isNodeServer){ + await sleep(100) + } + i++ + } + alertStore.set({ + type: 'none', + msg: '' + }) + + module.id = v4() + return module } export async function importModule(){ - const f = await selectSingleFile(['json', 'lorebook']) + const f = await selectSingleFile(['json', 'lorebook', 'risum']) if(!f){ return } - const file = f.data + let fileData = f.data const db = get(DataBase) + if(f.name.endsWith('.risum')){ + try { + const buf = Buffer.from(fileData) + const module = await readModule(buf) + db.modules.push(module) + setDatabase(db) + return + } catch (error) { + console.error(error) + alertError(language.errors.noData) + } + } try { - const importData = JSON.parse(Buffer.from(file).toString()) + const importData = JSON.parse(Buffer.from(fileData).toString()) if(importData.type === 'risuModule'){ if( (!importData.name) @@ -109,19 +259,37 @@ function getModuleById(id:string){ return null } +function getModuleByIds(ids:string[]){ + let modules:RisuModule[] = [] + const db = get(DataBase) + for(let i=0;i m.id === ids[i] || (m.namespace === ids[i] && m.namespace)) + if(module){ + modules.push(module) + } + } + return modules +} + let lastModules = '' let lastModuleData:RisuModule[] = [] -export function getModules(ids:string[]){ +export function getModules(){ + const currentChat = get(CurrentChat) + const db = get(DataBase) + let ids = db.enabledModules ?? [] + if (currentChat){ + ids = ids.concat(currentChat.modules ?? []) + } + if(db.moduleIntergration){ + const intList = db.moduleIntergration.split(',').map((s) => s.trim()) + ids = ids.concat(intList) + } const idsJoined = ids.join('-') if(lastModules === idsJoined){ return lastModuleData } - let modules:RisuModule[] = [] - for(const id of ids){ - const module = getModuleById(id) - modules.push(module) - } + let modules:RisuModule[] = getModuleByIds(ids) lastModules = idsJoined lastModuleData = modules return modules @@ -130,12 +298,7 @@ export function getModules(ids:string[]){ export function getModuleLorebooks() { - const currentChat = get(CurrentChat) - const db = get(DataBase) - if (!currentChat) return [] - let moduleIds = currentChat.modules ?? [] - moduleIds = moduleIds.concat(db.enabledModules) - const modules = getModules(moduleIds) + const modules = getModules() let lorebooks: loreBook[] = [] for (const module of modules) { if(!module){ @@ -148,14 +311,23 @@ export function getModuleLorebooks() { return lorebooks } +export function getModuleAssets() { + const modules = getModules() + let assets: [string,string,string][] = [] + for (const module of modules) { + if(!module){ + continue + } + if (module.assets) { + assets = assets.concat(module.assets) + } + } + return assets +} + export function getModuleTriggers() { - const currentChat = get(CurrentChat) - const db = get(DataBase) - if (!currentChat) return [] - let moduleIds = currentChat.modules ?? [] - moduleIds = moduleIds.concat(db.enabledModules) - const modules = getModules(moduleIds) + const modules = getModules() let triggers: triggerscript[] = [] for (const module of modules) { if(!module){ @@ -172,12 +344,7 @@ export function getModuleTriggers() { } export function getModuleRegexScripts() { - const currentChat = get(CurrentChat) - const db = get(DataBase) - if (!currentChat) return [] - let moduleIds = currentChat.modules ?? [] - moduleIds = moduleIds.concat(db.enabledModules) - const modules = getModules(moduleIds) + const modules = getModules() let customscripts: customscript[] = [] for (const module of modules) { if(!module){ diff --git a/src/ts/process/processzip.ts b/src/ts/process/processzip.ts index a74d0c5f..a3f85f6d 100644 --- a/src/ts/process/processzip.ts +++ b/src/ts/process/processzip.ts @@ -81,6 +81,7 @@ export class CharXReader{ assetPromises:Promise[] = [] excludedFiles:string[] = [] cardData:string|undefined + moduleData:Uint8Array|undefined constructor(){ this.unzip = new fflate.Unzip() this.unzip.register(fflate.UnzipInflate) @@ -98,6 +99,9 @@ export class CharXReader{ else if(file.name === 'card.json'){ this.cardData = new TextDecoder().decode(assetData) } + else if(file.name === 'module.risum'){ + this.moduleData = assetData + } else{ this.assetPromises.push((async () => { const assetId = await saveAsset(assetData) diff --git a/src/ts/process/prompt.ts b/src/ts/process/prompt.ts index 1b5b1aea..84614498 100644 --- a/src/ts/process/prompt.ts +++ b/src/ts/process/prompt.ts @@ -1,6 +1,8 @@ import { get } from "svelte/store"; import { tokenizeAccurate } from "../tokenizer"; -import type { Database } from "../storage/database"; +import { DataBase, presetTemplate, setDatabase, type Database } from "../storage/database"; +import { alertError, alertNormal } from "../alert"; +import type { OobaChatCompletionRequestParams } from "../model/ooba"; export type PromptItem = PromptItemPlain|PromptItemTyped|PromptItemChat|PromptItemAuthorNote; export type PromptType = PromptItem['type']; @@ -64,3 +66,404 @@ export async function tokenizePreset(prompts:PromptItem[], consti:boolean = fals } return total } + +export function detectPromptJSONType(text:string){ + + function notNull(x:T|null):x is T{ + return x !== null && x !== undefined + } + + try { + const parsed = JSON.parse(text) + if(notNull(parsed.chat_completion_source) && Array.isArray(parsed.prompts)&& Array.isArray(parsed.prompt_order)){ + return "STCHAT" + } + else if(notNull(parsed.temp) && notNull(parsed.rep_pen) && notNull(parsed.min_length)){ + return "PARAMETERS" + } + else if(notNull(parsed.story_string) && notNull(parsed.chat_start)){ + return "STCONTEXT" + } + else if(notNull(parsed.input_sequence) && notNull(parsed.output_sequence)){ + return "STINST" + } + } catch (e) {} + return 'NOTSUPPORTED' +} + +const typePriority = [ + 'STINST', + 'PARAMETERS', + 'STCONTEXT', + 'STCHAT', +] + + +type InstData = { + "system_prompt": string, + "input_sequence": string, + "output_sequence": string, + "last_output_sequence": string, + "system_sequence": string, + "stop_sequence": string, + "system_sequence_prefix": string, + "system_sequence_suffix": string, + "first_output_sequence": string, + "output_suffix": string, + "input_suffix": string, + "system_suffix": string, + "user_alignment_message": string, + "system_same_as_user": boolean, + "last_system_sequence": string, + "first_input_sequence": string, + "last_input_sequence": string, + "name": string +} + +export function stChatConvert(pre:any){ + //ST preset + let promptTemplate = [] + + function findPrompt(identifier:number){ + return pre.prompts.find((p:any) => p.identifier === identifier) + } + + for(const prompt of pre?.prompt_order?.[0]?.order){ + if(!prompt?.enabled){ + continue + } + const p = findPrompt(prompt?.identifier ?? '') + if(p){ + switch(p.identifier){ + case 'main':{ + promptTemplate.push({ + type: 'plain', + type2: 'main', + text: p.content ?? "", + role: p.role ?? "system" + }) + break + } + case 'jailbreak': + case 'nsfw':{ + promptTemplate.push({ + type: 'jailbreak', + type2: 'normal', + text: p.content ?? "", + role: p.role ?? "system" + }) + break + } + case 'dialogueExamples': + case 'charPersonality': + case 'scenario':{ + break //ignore + } + case 'chatHistory':{ + promptTemplate.push({ + type: 'chat', + rangeEnd: 'end', + rangeStart: 0 + }) + break + } + case 'worldInfoBefore':{ + promptTemplate.push({ + type: 'lorebook' + }) + break + } + case 'worldInfoAfter':{ + break + } + case 'charDescription':{ + promptTemplate.push({ + type: 'description' + }) + break + } + case 'personaDescription':{ + promptTemplate.push({ + type: 'persona' + }) + break + } + default:{ + console.log(p) + promptTemplate.push({ + type: 'plain', + type2: 'normal', + text: p.content ?? "", + role: p.role ?? "system" + }) + } + } + } + else{ + console.log("Prompt not found", prompt) + + } + } + if(pre?.assistant_prefill){ + promptTemplate.push({ + type: 'postEverything' + }) + promptTemplate.push({ + type: 'plain', + type2: 'main', + text: `{{#if {{prefill_supported}}}}${pre?.assistant_prefill}{{/if}}`, + role: 'bot' + }) + } + + return promptTemplate +} + +export const OobaParams = [ + "tokenizer", + "min_p", + "top_k", + "repetition_penalty", + "repetition_penalty_range", + "typical_p", + "tfs", + "top_a", + "epsilon_cutoff", + "eta_cutoff", + "guidance_scale", + "negative_prompt", + "penalty_alpha", + "mirostat_mode", + "mirostat_tau", + "mirostat_eta", + "temperature_last", + "do_sample", + "seed", + "encoder_repetition_penalty", + "no_repeat_ngram_size", + "min_length", + "num_beams", + "length_penalty", + "early_stopping", + "truncation_length", + "max_tokens_second", + "custom_token_bans", + "auto_max_new_tokens", + "ban_eos_token", + "add_bos_token", + "skip_special_tokens", + "grammar_string" +] + +export function promptConvertion(files:{ name: string, content: string, type:string }[]){ + let preset = structuredClone(presetTemplate) + let instData = { + "system_prompt": "", + "input_sequence": "", + "output_sequence": "", + "last_output_sequence": "", + "system_sequence": "", + "stop_sequence": "", + "system_sequence_prefix": "", + "system_sequence_suffix": "", + "first_output_sequence": "", + "output_suffix": "", + "input_suffix": "", + "system_suffix": "", + "user_alignment_message": "", + "system_same_as_user": false, + "last_system_sequence": "", + "first_input_sequence": "", + "last_input_sequence": "", + "name": "" + } + let story_string = '' + let chat_start = '' + preset.name = '' + + let type = '' + + files = files.filter(x=>x.type !== 'NOTSUPPORTED').sort((a,b)=>{ + return typePriority.indexOf(a.type) - typePriority.indexOf(b.type) + }) + + + if(files.findIndex(x=>x.type === 'STINST') !== -1){ + type = 'STINST' + } + if(files.findIndex(x=>x.type === 'STCHAT') !== -1){ + if(type !== ''){ + alertError(`Both ${type} and STCHAT are not supported together.`) + return + } + type = 'STCHAT' + } + + let samplers:string[] = [] + + let oobaData:OobaChatCompletionRequestParams = { + mode: 'instruct', + } + + + for(let i=0;i { + if(getname === ''){ + getname = setname + } + let multiplier = arg.multiplier ?? 1 + if(samplers.includes(getname)){ + //@ts-ignore + preset[setname] = data[getname] * multiplier + } + else{ + // @ts-ignore + preset[setname] = -1000 + } + + if(OobaParams.includes(getname)){ + oobaData[getname] = data[getname] + } + } + + preset.name ||= instData.name ?? '' + switch(file.type){ + case 'STINST':{ + instData = data as InstData + if(data.system_same_as_user){ + instData.system_sequence = '' + instData.system_sequence_prefix = instData.input_sequence + instData.system_sequence_suffix = instData.output_sequence + } + break + } + case 'PARAMETERS':{ + samplers = data.samplers + getParam('temperature', 'temp', {multiplier: 100}) + getParam('top_p') + getParam('top_k') + getParam('top_a') + getParam('min_p') + getParam('repetition_penalty', 'rep_pen') + getParam('frequencyPenalty', 'freq_pen', {multiplier: 100}) + getParam('PresensePenalty', 'presence_penalty', {multiplier: 100}) + for(const key of OobaParams){ + if(samplers.includes(key) && (data[key] !== undefined) && (data[key] !== null)){ + oobaData[key] = data[key] + } + } + break + } + case 'STCONTEXT':{ + story_string = data.story_string + chat_start = data.chat_start + break + } + case 'STCHAT':{ + samplers = [] + getParam('temperature', 'temperature', {multiplier: 100}) + getParam('top_p') + getParam('top_k') + getParam('top_a') + getParam('min_p') + getParam('repetition_penalty', 'repetition_penalty') + getParam('frequencyPenalty', 'frequency_penalty', {multiplier: 100}) + getParam('PresensePenalty', 'presence_penalty', {multiplier: 100}) + const prompts = stChatConvert(data) + preset.promptTemplate = prompts + } + } + } + + if(type === 'STCHAT'){ + preset.aiModel = 'openrouter' + preset.subModel = 'openrouter' + const db = get(DataBase) + db.botPresets.push(preset) + setDatabase(db) + + alertNormal('Preset converted successfully. You can find it in bot setting presets') + return + } + + preset.reverseProxyOobaArgs = oobaData + + preset.promptTemplate = [{ + type: 'plain', + type2: 'main', + text: '', + role: 'system' + },{ + type: 'description', + },{ + type: 'persona', + },{ + type: 'lorebook', + },{ + type: 'chat', + rangeStart: 0, + rangeEnd: 'end', + }, { + type: 'authornote', + }, { + type: 'plain', + type2: 'globalNote', + text: '', + role: 'system' + }] + + + + //build a jinja template from the instData + let jinja = '' + + jinja += story_string + .replace(/{{user}}/gi, '{{risu_user}}') + .replace(/{{user}}/gi, '{{risu_user}}') + .replace(/{{system_prompt}}/gi, instData.system_prompt) + .replace(/{{system}}/gi, instData.system_prompt) + .replace(/{{#if (.+?){{\/if}}/gis, '') + .replace(/{{(.+?)}}/gi, '') + .replace(/\n\n+/g, '\n\n') + jinja += chat_start + jinja += `{% for message in messages %}` + jinja += `{% if message.role == 'user' %}` + jinja += instData.input_sequence + jinja += `{{ message.content }}` + jinja += instData.input_suffix + jinja += `{% endif %}` + jinja += `{% if message.role == 'assistant' %}` + jinja += instData.output_sequence + jinja += `{{ message.content }}` + jinja += instData.output_suffix + jinja += `{% endif %}` + jinja += `{% if message.role == 'system' %}` + jinja += instData.system_sequence + jinja += instData.system_sequence_prefix + jinja += `{{ message.content }}` + jinja += instData.system_sequence_suffix + jinja += instData.system_suffix + jinja += `{% endif %}` + jinja += `{% endfor %}` + jinja += instData.output_sequence + + preset.instructChatTemplate = "jinja" + preset.JinjaTemplate = jinja + preset.aiModel = 'openrouter' + preset.subModel = 'openrouter' + preset.useInstructPrompt = true + + preset.name ||= 'Converted from JSON' + + + const db = get(DataBase) + db.botPresets.push(preset) + setDatabase(db) + + alertNormal('Preset converted successfully. You can find it in bot setting presets') +} \ No newline at end of file diff --git a/src/ts/process/request.ts b/src/ts/process/request.ts index e139b6fe..1e052153 100644 --- a/src/ts/process/request.ts +++ b/src/ts/process/request.ts @@ -21,6 +21,8 @@ import { runTransformers } from "./transformers"; import {createParser} from 'eventsource-parser' import {Ollama} from 'ollama/dist/browser.mjs' import { applyChatTemplate } from "./templates/chatTemplate"; +import { OobaParams } from "./prompt"; +import { extractJSON, getOpenAIJSONSchema } from "./templates/jsonSchema"; @@ -79,6 +81,60 @@ interface OaiFunctions { }; } + +type Parameter = 'temperature'|'top_k'|'repetition_penalty'|'min_p'|'top_a'|'top_p'|'frequency_penalty'|'presence_penalty' +type ParameterMap = { + [key in Parameter]?: string; +}; + +function applyParameters(data: { [key: string]: any }, parameters: Parameter[], rename: ParameterMap = {}) { + const db = get(DataBase) + for(const parameter of parameters){ + let value = 0 + switch(parameter){ + case 'temperature':{ + value = db.temperature === -1000 ? -1000 : (db.temperature / 100) + break + } + case 'top_k':{ + value = db.top_k + break + } + case 'repetition_penalty':{ + value = db.repetition_penalty + break + } + case 'min_p':{ + value = db.min_p + break + } + case 'top_a':{ + value = db.top_a + break + } + case 'top_p':{ + value = db.top_p + break + } + case 'frequency_penalty':{ + value = db.frequencyPenalty === -1000 ? -1000 : (db.frequencyPenalty / 100) + break + } + case 'presence_penalty':{ + value = db.PresensePenalty === -1000 ? -1000 : (db.PresensePenalty / 100) + break + } + } + + if(value === -1000){ + continue + } + + data[rename[parameter] ?? parameter] = value + } + return data +} + export async function requestChatData(arg:requestDataArgument, model:'model'|'submodel', abortSignal:AbortSignal=null):Promise { const db = get(DataBase) let trys = 0 @@ -131,7 +187,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' let useStreaming = db.useStreaming && arg.useStreaming arg.continue = arg.continue ?? false let biasString = arg.biasString ?? [] - const aiModel = (model === 'model' || (!db.advancedBotSettings)) ? db.aiModel : db.subModel + const aiModel = model === 'model' ? db.aiModel : db.subModel const multiGen = (db.genTime > 1 && aiModel.startsWith('gpt') && (!arg.continue)) && (!arg.noMultiGen) let raiModel = aiModel @@ -180,6 +236,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' case 'gpt4om-2024-07-18': case 'gpt4o-2024-08-06': case 'gpt4o-chatgpt': + case 'gpt4o1-preview': + case 'gpt4o1-mini': + case 'jamba-1.5-large': + case 'jamba-1.5-medium': case 'reverse_proxy':{ let formatedChat:OpenAIChatExtra[] = [] for(let i=0;i${formatedChat[i].content}` + formatedChat[i].role = 'user' + } + } + } + for(let i=0;i 0){ - // @ts-ignore body.seed = db.generationSeed } if(db.putUserOpen){ - // @ts-ignore body.user = getOpenUserString() } - if(aiModel === 'openrouter'){ - if(db.top_k !== 0){ - //@ts-ignore - body.top_k = db.top_k + if(db.jsonSchemaEnabled){ + body.response_format = { + "type": "json_schema", + "json_schema": getOpenAIJSONSchema() } + } + + if(aiModel === 'openrouter'){ if(db.openrouterFallback){ - //@ts-ignore body.route = "fallback" } - //@ts-ignore - body.repetition_penalty = db.repetition_penalty - //@ts-ignore - body.min_p = db.min_p - //@ts-ignore - body.top_a = db.top_a - //@ts-ignore body.transforms = db.openrouterMiddleOut ? ['middle-out'] : [] if(db.openrouterProvider){ - //@ts-ignore body.provider = { order: [db.openrouterProvider] } } if(db.useInstructPrompt){ - //@ts-ignore delete body.messages - const prompt = applyChatTemplate(formated) - - //@ts-ignore body.prompt = prompt } } + body = applyParameters(body, + aiModel === 'openrouter' ? ['temperature', 'top_p', 'frequency_penalty', 'presence_penalty', 'repetition_penalty', 'min_p', 'top_a', 'top_k'] : ['temperature', 'top_p', 'frequency_penalty', 'presence_penalty'] + ) + if(aiModel === 'reverse_proxy' && db.reverseProxyOobaMode){ const OobaBodyTemplate = db.reverseProxyOobaArgs @@ -549,6 +615,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' if(risuIdentify){ headers["X-Proxy-Risu"] = 'RisuAI' } + if(aiModel.startsWith('jamba')){ + headers['Authorization'] = 'Bearer ' + db.ai21Key + replacerURL = 'https://api.ai21.com/studio/v1/chat/completions' + } if(multiGen){ // @ts-ignore body.n = db.genTime @@ -594,11 +664,12 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' url: replacerURL, }) - let dataUint = new Uint8Array([]) + let dataUint:Uint8Array|Buffer = new Uint8Array([]) const transtream = new TransformStream( { async transform(chunk, control) { dataUint = Buffer.from(new Uint8Array([...dataUint, ...chunk])) + let JSONreaded:{[key:string]:string} = {} try { const datas = dataUint.toString().split('\n') let readed:{[key:string]:string} = {} @@ -607,7 +678,17 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' try { const rawChunk = data.replace("data: ", "") if(rawChunk === "[DONE]"){ - control.enqueue(readed) + if(db.extractJson && db.jsonSchemaEnabled){ + for(const key in readed){ + const extracted = extractJSON(readed[key], db.extractJson) + JSONreaded[key] = extracted + } + console.log(JSONreaded) + control.enqueue(JSONreaded) + } + else{ + control.enqueue(readed) + } return } const choices = JSON.parse(rawChunk).choices @@ -632,7 +713,17 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' } catch (error) {} } } - control.enqueue(readed) + if(db.extractJson && db.jsonSchemaEnabled){ + for(const key in readed){ + const extracted = extractJSON(readed[key], db.extractJson) + JSONreaded[key] = extracted + } + console.log(JSONreaded) + control.enqueue(JSONreaded) + } + else{ + control.enqueue(readed) + } } catch (error) { } @@ -699,6 +790,21 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' if(res.ok){ try { if(multiGen && dat.choices){ + if(db.extractJson && db.jsonSchemaEnabled){ + + const c = dat.choices.map((v:{ + message:{content:string} + }) => { + const extracted = extractJSON(v.message.content, db.extractJson) + return ["char",extracted] + }) + + return { + type: 'multiline', + result: c + } + + } return { type: 'multiline', result: dat.choices.map((v) => { @@ -709,11 +815,33 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' } if(dat?.choices[0]?.text){ + if(db.extractJson && db.jsonSchemaEnabled){ + try { + const parsed = JSON.parse(dat.choices[0].text) + const extracted = extractJSON(parsed, db.extractJson) + return { + type: 'success', + result: extracted + } + } catch (error) { + console.log(error) + return { + type: 'success', + result: dat.choices[0].text + } + } + } return { type: 'success', result: dat.choices[0].text } } + if(db.extractJson && db.jsonSchemaEnabled){ + return { + type: 'success', + result: extractJSON(dat.choices[0].message.content, db.extractJson) + } + } const msg:OpenAIChatFull = (dat.choices[0].message) return { type: 'success', @@ -814,7 +942,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' "parameters":payload } - const da = await globalFetch("https://api.novelai.net/ai/generate", { + const da = await globalFetch(aiModel === 'novelai_kayra' ? "https://text.novelai.net/ai/generate" : "https://api.novelai.net/ai/generate", { body: body, headers: { "Authorization": "Bearer " + db.novelai.token @@ -889,7 +1017,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' case 'mancer':{ let streamUrl = db.textgenWebUIStreamURL.replace(/\/api.*/, "/api/v1/stream") let blockingUrl = db.textgenWebUIBlockingURL.replace(/\/api.*/, "/api/v1/generate") - let bodyTemplate:any + let bodyTemplate:{[key:string]:any} = {} const suggesting = model === "submodel" const prompt = applyChatTemplate(formated) let stopStrings = getStopStrings(suggesting) @@ -1035,9 +1163,12 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' const OobaBodyTemplate = db.reverseProxyOobaArgs const keys = Object.keys(OobaBodyTemplate) for(const key of keys){ - if(OobaBodyTemplate[key] !== undefined && OobaBodyTemplate[key] !== null){ + if(OobaBodyTemplate[key] !== undefined && OobaBodyTemplate[key] !== null && OobaParams.includes(key)){ bodyTemplate[key] = OobaBodyTemplate[key] } + else if(bodyTemplate[key]){ + delete bodyTemplate[key] + } } const response = await globalFetch(urlStr, { @@ -1109,7 +1240,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' const API_ENDPOINT="us-central1-aiplatform.googleapis.com" const PROJECT_ID=db.google.projectId const MODEL_ID= aiModel === 'palm2' ? 'text-bison' : - 'palm2_unicorn' ? 'text-unicorn' : + aiModel ==='palm2_unicorn' ? 'text-unicorn' : '' const LOCATION_ID="us-central1" @@ -1153,7 +1284,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' case 'gemini-pro': case 'gemini-pro-vision': case 'gemini-1.5-pro-latest': + case 'gemini-1.5-pro-exp-0801': + case 'gemini-1.5-pro-exp-0827': case 'gemini-1.5-flash': + case 'gemini-1.5-pro-002': case 'gemini-ultra': case 'gemini-ultra-vision':{ interface GeminiPart{ @@ -1292,11 +1426,11 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' const body = { contents: reformatedChat, - generation_config: { + generation_config: applyParameters({ "maxOutputTokens": maxTokens, - "temperature": temperature, - "topP": db.top_p, - }, + }, ['temperature', 'top_p'], { + 'top_p': "topP" + }), safetySettings: uncensoredCatagory } @@ -1366,14 +1500,20 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' url.pathname = 'api/v1/generate' } - const body:KoboldGenerationInputSchema = { + const body = applyParameters({ "prompt": prompt, - "temperature": (db.temperature / 100), - "top_p": db.top_p, max_length: maxTokens, max_context_length: db.maxContext, n: 1 - } + }, [ + 'temperature', + 'top_p', + 'repetition_penalty', + 'top_k', + 'top_a' + ], { + 'repetition_penalty': 'rep_pen' + }) as KoboldGenerationInputSchema const da = await globalFetch(url.toString(), { method: "POST", @@ -1535,7 +1675,11 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' } } case 'cohere-command-r': - case 'cohere-command-r-plus':{ + case 'cohere-command-r-plus': + case 'cohere-command-r-08-2024': + case 'cohere-command-r-03-2024': + case 'cohere-command-r-plus-04-2024': + case 'cohere-command-r-plus-08-2024':{ const modelName = aiModel.replace('cohere-', '') let lastChatPrompt = '' let preamble = '' @@ -1566,10 +1710,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' //reformat chat - - - - let body = { + let body = applyParameters({ message: lastChatPrompt, chat_history: formated.map((v) => { if(v.role === 'assistant'){ @@ -1594,13 +1735,17 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' }).filter((v) => v !== null).filter((v) => { return v.message }), - temperature: temperature, - k: db.top_k, - p: (db.top_p > 0.99) ? 0.99 : (db.top_p < 0.01) ? 0.01 : db.top_p, - presence_penalty: arg.PresensePenalty || (db.PresensePenalty / 100), - frequency_penalty: arg.frequencyPenalty || (db.frequencyPenalty / 100), - } + }, [ + 'temperature', 'top_k', 'top_p', 'presence_penalty', 'frequency_penalty' + ], { + 'top_k': 'k', + 'top_p': 'p', + }) + if(aiModel !== 'cohere-command-r-03-2024' && aiModel !== 'cohere-command-r-plus-04-2024'){ + body.safety_mode = "NONE" + } + if(preamble){ if(body.chat_history.length > 0){ // @ts-ignore @@ -1873,16 +2018,13 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' } - let body = { + let body = applyParameters({ model: raiModel, messages: finalChat, system: systemPrompt.trim(), max_tokens: maxTokens, - temperature: temperature, - top_p: db.top_p, - top_k: db.top_k, stream: useStreaming ?? false - } + }, ['temperature', 'top_k', 'top_p']) if(systemPrompt === ''){ delete body.system @@ -1997,6 +2139,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' headers['anthropic-beta'] = 'prompt-caching-2024-07-31' } + if(db.usePlainFetch){ + headers['anthropic-dangerous-direct-browser-access'] = 'true' + } + if(useStreaming){ const res = await fetchNative(replacerURL, { diff --git a/src/ts/process/scripts.ts b/src/ts/process/scripts.ts index 488329a9..7e90b044 100644 --- a/src/ts/process/scripts.ts +++ b/src/ts/process/scripts.ts @@ -5,9 +5,9 @@ import { downloadFile } from "../storage/globalApi"; import { alertError, alertNormal } from "../alert"; import { language } from "src/lang"; import { selectSingleFile } from "../util"; -import { assetRegex, risuChatParser as risuChatParserOrg, type simpleCharacterArgument } from "../parser"; +import { assetRegex, type CbsConditions, risuChatParser as risuChatParserOrg, type simpleCharacterArgument } from "../parser"; import { runCharacterJS } from "../plugins/embedscript"; -import { getModuleRegexScripts } from "./modules"; +import { getModuleAssets, getModuleRegexScripts } from "./modules"; import { HypaProcesser } from "./memory/hypamemory"; import { runLuaEditTrigger } from "./lua"; @@ -16,13 +16,19 @@ const randomness = /\|\|\|/g export type ScriptMode = 'editinput'|'editoutput'|'editprocess'|'editdisplay' -export async function processScript(char:character|groupChat, data:string, mode:ScriptMode){ - return (await processScriptFull(char, data, mode)).data +type pScript = { + script: customscript, + order: number + actions: string[] } -export function exportRegex(){ +export async function processScript(char:character|groupChat, data:string, mode:ScriptMode, cbsConditions:CbsConditions = {}){ + return (await processScriptFull(char, data, mode, -1, cbsConditions)).data +} + +export function exportRegex(s?:customscript[]){ let db = get(DataBase) - const script = db.globalscript + const script = s ?? db.globalscript const data = Buffer.from(JSON.stringify({ type: 'regex', data: script @@ -31,22 +37,22 @@ export function exportRegex(){ alertNormal(language.successExport) } -export async function importRegex(){ +export async function importRegex(o?:customscript[]):Promise{ + o = o ?? [] const filedata = (await selectSingleFile(['json'])).data if(!filedata){ - return + return o } let db = get(DataBase) try { const imported= JSON.parse(Buffer.from(filedata).toString('utf-8')) if(imported.type === 'regex' && imported.data){ const datas:customscript[] = imported.data - const script = db.globalscript + const script = o for(const data of datas){ script.push(data) } - db.globalscript = script - setDatabase(db) + return o } else{ alertError("File invaid or corrupted") @@ -55,11 +61,12 @@ export async function importRegex(){ } catch (error) { alertError(`${error}`) } + return o } let bestMatchCache = new Map() -export async function processScriptFull(char:character|groupChat|simpleCharacterArgument, data:string, mode:ScriptMode, chatID = -1){ +export async function processScriptFull(char:character|groupChat|simpleCharacterArgument, data:string, mode:ScriptMode, chatID = -1, cbsConditions:CbsConditions = {}){ let db = get(DataBase) let emoChanged = false const scripts = (db.globalscript ?? []).concat(char.customscript).concat(getModuleRegexScripts()) @@ -72,7 +79,9 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter if(scripts.length === 0){ return {data, emoChanged} } - for (const script of scripts){ + function executeScript(pscript:pScript){ + const script = pscript.script + if(script.type === mode){ let outScript2 = script.out.replaceAll("$n", "\n") @@ -81,18 +90,29 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter if(script.ableFlag){ flag = script.flag || 'g' } - if(outScript.startsWith('@@move_top') || outScript.startsWith('@@move_bottom')){ + if(outScript.startsWith('@@move_top') || outScript.startsWith('@@move_bottom') || pscript.actions.includes('move_top') || pscript.actions.includes('move_bottom')){ flag = flag.replace('g', '') //temperary fix } + if(outScript.endsWith('>') && !pscript.actions.includes('no_end_nl')){ + outScript += '\n' + } //remove unsupported flag - flag = flag.replace(/[^gimuy]/g, '') + flag = flag.trim().replace(/[^dgimsuvy]/g, '') + //remove repeated flags + flag = flag.split('').filter((v, i, a) => a.indexOf(v) === i).join('') + if(flag.length === 0){ flag = 'u' } - const reg = new RegExp(script.in, flag) - if(outScript.startsWith('@@')){ + let input = script.in + if(pscript.actions.includes('cbs')){ + input = risuChatParser(input, { chatID: chatID, cbsConditions }) + } + + const reg = new RegExp(input, flag) + if(outScript.startsWith('@@') || pscript.actions.length > 0){ if(reg.test(data)){ if(outScript.startsWith('@@emo ')){ const emoName = script.out.substring(6).trim() @@ -117,17 +137,19 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter } } } - if(outScript.startsWith('@@inject') && chatID !== -1){ + else if((outScript.startsWith('@@inject') || pscript.actions.includes('inject')) && chatID !== -1){ const selchar = db.characters[get(selectedCharID)] selchar.chats[selchar.chatPage].message[chatID].data = data data = data.replace(reg, "") } - if(outScript.startsWith('@@move_top') || outScript.startsWith('@@move_bottom')){ + else if( + outScript.startsWith('@@move_top') || outScript.startsWith('@@move_bottom') || + pscript.actions.includes('move_top') || pscript.actions.includes('move_bottom') + ){ const isGlobal = flag.includes('g') const matchAll = isGlobal ? data.matchAll(reg) : [data.match(reg)] data = data.replace(reg, "") for(const matched of matchAll){ - console.log(matched) if(matched){ const inData = matched[0] let out = outScript.replace('@@move_top ', '').replace('@@move_bottom ', '') @@ -146,8 +168,7 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter } return v }) - console.log(out) - if(outScript.startsWith('@@move_top')){ + if(outScript.startsWith('@@move_top') || pscript.actions.includes('move_top')){ data = out + '\n' +data } else{ @@ -156,13 +177,16 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter } } } + else{ + data = risuChatParser(data.replace(reg, outScript), { chatID: chatID, cbsConditions }) + } } else{ - if(outScript.startsWith('@@repeat_back') && chatID !== -1){ + if((outScript.startsWith('@@repeat_back') || pscript.actions.includes('repeat_back')) && chatID !== -1){ const v = outScript.split(' ', 2)[1] const selchar = db.characters[get(selectedCharID)] const chat = selchar.chats[selchar.chatPage] - let lastChat = selchar.firstMsgIndex === -1 ? selchar.firstMessage : selchar.alternateGreetings[selchar.firstMsgIndex] + let lastChat = chat.fmIndex === -1 ? selchar.firstMessage : selchar.alternateGreetings[chat.fmIndex] let pointer = chatID - 1 while(pointer >= 0){ if(chat.message[pointer].role === chat.message[chatID].role){ @@ -197,16 +221,72 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter } } else{ - data = risuChatParser(data.replace(reg, outScript), { chatID: chatID }) + data = risuChatParser(data.replace(reg, outScript), { chatID: chatID, cbsConditions }) } } } + let parsedScripts:pScript[] = [] + let orderChanged = false + for (const script of scripts){ + if(script.ableFlag && script.flag?.includes('<')){ + const rregex = /<(.+?)>/g + const scriptData = structuredClone(script) + let order = 0 + const actions:string[] = [] + scriptData.flag = scriptData.flag?.replace(rregex, (v:string, p1:string) => { + const meta = p1.split(',').map((v) => v.trim()) + for(const m of meta){ + if(m.startsWith('order ')){ + order = parseInt(m.substring(6)) + } + else{ + actions.push(m) + } + } + + return '' + }) + parsedScripts.push({ + script: scriptData, + order, + actions + }) + continue + } + parsedScripts.push({ + script, + order: 0, + actions: [] + }) + } + + if(orderChanged){ + parsedScripts.sort((a, b) => b.order - a.order) //sort by order + } + for (const script of parsedScripts){ + try { + executeScript(script) + } catch (error) { + console.error(error) + } + } + + + if(db.dynamicAssets && (char.type === 'simple' || char.type === 'character') && char.additionalAssets && char.additionalAssets.length > 0){ if(!db.dynamicAssetsEditDisplay && mode === 'editdisplay'){ return {data, emoChanged} } const assetNames = char.additionalAssets.map((v) => v[0]) + + const moduleAssets = getModuleAssets() + if(moduleAssets.length > 0){ + for(const asset of moduleAssets){ + assetNames.push(asset[0]) + } + } + const processer = new HypaProcesser('MiniLM') await processer.addText(assetNames) const matches = data.matchAll(assetRegex) diff --git a/src/ts/process/stableDiff.ts b/src/ts/process/stableDiff.ts index fea4138c..87e4120c 100644 --- a/src/ts/process/stableDiff.ts +++ b/src/ts/process/stableDiff.ts @@ -6,6 +6,7 @@ import { globalFetch, readImage } from "../storage/globalApi" import { CharEmotion } from "../stores" import type { OpenAIChat } from "." import { processZip } from "./processzip" +import { keiServerURL } from "../kei/kei" export async function stableDiff(currentChar:character,prompt:string){ let db = get(DataBase) @@ -488,5 +489,102 @@ export async function generateAIImage(genPrompt:string, currentChar:character, n return false } } + if(db.sdProvider === 'kei'){ + const db = get(DataBase) + let auth = db?.account?.token + if(!auth){ + db.account = JSON.parse(localStorage.getItem("fallbackRisuToken")) + auth = db?.account?.token + db.account.useSync = true + } + const da = await globalFetch(keiServerURL() + '/imaggen', { + body: { + "prompt": genPrompt, + }, + headers: { + "x-api-key": auth + } + }) + + if(!da.ok || !da.data.success){ + alertError(Buffer.from(da.data.message || da.data).toString()) + return false + } + if(returnSdData === 'inlay'){ + return da.data.data + } + else{ + let charemotions = get(CharEmotion) + const img = da.data.data + const emos:[string, string,number][] = [[img, img, Date.now()]] + charemotions[currentChar.chaId] = emos + CharEmotion.set(charemotions) + } + return returnSdData + + } + if(db.sdProvider === 'fal'){ + const model = db.falModel + const token = db.falToken + + let body:{[key:string]:any} = { + prompt: genPrompt, + enable_safety_checker: false, + sync_mode: true, + image_size: { + "width": db.sdConfig.width, + "height": db.sdConfig.height, + } + } + + if(db.falModel === 'fal-ai/flux-lora'){ + let loraPath = db.falLora + if(loraPath.startsWith('urn:') || loraPath.startsWith('civitai:')){ + const id = loraPath.split('@').pop() + loraPath = `https://civitai.com/api/download/models/${id}?type=Model&format=SafeTensor` + } + body.loras = [{ + "path": loraPath, + "scale": db.falLoraScale + }] + } + + if(db.falModel === 'fal-ai/flux-pro'){ + delete body.enable_safety_checker + } + console.log(body) + + const res = await globalFetch('https://fal.run/' + model, { + headers: { + "Authorization": "Key " + token, + "Content-Type": "application/json" + }, + method: 'POST', + body: body + }) + + console.log(res) + + if(!res.ok){ + alertError(JSON.stringify(res.data)) + return false + } + + let image = res.data?.images?.[0]?.url + if(!image){ + alertError(JSON.stringify(res.data)) + return false + } + + if(returnSdData === 'inlay'){ + return image + } + else{ + let charemotions = get(CharEmotion) + const emos:[string, string,number][] = [[image, image, Date.now()]] + charemotions[currentChar.chaId] = emos + CharEmotion.set(charemotions) + } + } return '' } diff --git a/src/ts/process/templates/chatTemplate.ts b/src/ts/process/templates/chatTemplate.ts index 71b969b2..f1ff328d 100644 --- a/src/ts/process/templates/chatTemplate.ts +++ b/src/ts/process/templates/chatTemplate.ts @@ -11,7 +11,7 @@ export const chatTemplates = { 'chatml': `{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}`, 'gpt2': `{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}`, 'gemma': "{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '' + role + '\n' + message['content'] | trim + '\n' }}{% endfor %}{% if add_generation_prompt %}{{'model\n'}}{% endif %}", - 'mistral': "{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ ' [INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + message['content'] + ' ' + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}", + 'mistral': "{% for message in messages %}{% if message['role'] == 'user' %}{{ ' [INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + message['content'] + ' ' + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}", 'vicuna': "{%- set ns = namespace(found=false) -%}\n{%- for message in messages -%}\n {%- if message['role'] == 'system' -%}\n {%- set ns.found = true -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if not ns.found -%}\n {{- '' + 'A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user\\'s questions.' + '\\n\\n' -}}\n{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' -%}\n {{- '' + message['content'] + '\\n\\n' -}}\n {%- else -%}\n {%- if message['role'] == 'user' -%}\n {{-'USER: ' + message['content'] + '\\n'-}}\n {%- else -%}\n {{-'ASSISTANT: ' + message['content'] + '\\n' -}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{-'ASSISTANT:'-}}\n{%- endif -%}", "alpaca": "{%- set ns = namespace(found=false) -%}\n{%- for message in messages -%}\n {%- if message['role'] == 'system' -%}\n {%- set ns.found = true -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if not ns.found -%}\n {{- '' + 'Below is an instruction that describes a task. Write a response that appropriately completes the request.' + '\\n\\n' -}}\n{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' -%}\n {{- '' + message['content'] + '\\n\\n' -}}\n {%- else -%}\n {%- if message['role'] == 'user' -%}\n {{-'### Instruction:\\n' + message['content'] + '\\n\\n'-}}\n {%- else -%}\n {{-'### Response:\\n' + message['content'] + '\\n\\n' -}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{-'### Response:\\n'-}}\n{%- endif -%}" } @@ -22,19 +22,22 @@ export const templateEffect = { ], 'mistral': [ 'no_system_messages', - 'alter_user_assistant_roles' + 'alter_user_assistant_roles', ], } as {[key:string]:TemplateEffect[]} -export const applyChatTemplate = (messages:OpenAIChat[]) => { +export const applyChatTemplate = (messages:OpenAIChat[], arg:{ + type?: string + custom?: string +} = {}) => { const db = get(DataBase) const currentChar = get(CurrentCharacter) - const type = db.instructChatTemplate + const type = arg.type ?? db.instructChatTemplate if(!type){ throw new Error('Template type is not set') } let clonedMessages = structuredClone(messages) - const template = type === 'jinja' ? (new Template(db.JinjaTemplate)) :(new Template(chatTemplates[type])) + const template = type === 'jinja' ? (new Template(arg.custom ?? db.JinjaTemplate)) :(new Template(chatTemplates[type])) let formatedMessages:{ "role": 'user'|'assistant'|'system', "content": string @@ -94,6 +97,8 @@ export const applyChatTemplate = (messages:OpenAIChat[]) => { "messages": formatedMessages, "add_generation_prompt": true, "risu_char": currentChar.name, - "risu_user": getUserName() + "risu_user": getUserName(), + "eos_token": "", + "bos_token": "", }) } \ No newline at end of file diff --git a/src/ts/process/templates/jsonSchema.ts b/src/ts/process/templates/jsonSchema.ts new file mode 100644 index 00000000..1b162640 --- /dev/null +++ b/src/ts/process/templates/jsonSchema.ts @@ -0,0 +1,172 @@ +import { risuChatParser } from "src/ts/parser" +import { DataBase } from "src/ts/storage/database" +import { get } from "svelte/store" + +export function convertInterfaceToSchema(int:string){ + if(!int.startsWith('interface ') && !int.startsWith('export interface ')){ + return JSON.parse(int) + } + + int = risuChatParser(int) + + type SchemaProp = { + "type": "array"|"string"|"number"|"boolean", + "items"?:SchemaProp + "enum"?:string[] + "const"?:string + } + + const lines = int.split('\n') + let schema = { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": false, + "properties": {} as {[key:string]:SchemaProp}, + "required": [] as string[], + } + for(let i = 1; i < lines.length; i++){ + let content = lines[i].trim() + if(content === '{'){ + continue + } + if(content === '}'){ + continue + } + if(content === ''){ + continue + } + + let placeHolders:string[] = [] + + content = content + .replace(/\\"/gu, '\uE9b4a') + .replace(/\\'/gu, '\uE9b4b') + .replace(/"(.+?)"/gu, function(match, p1){ + placeHolders.push(match) + return `\uE9b4d${placeHolders.length - 1}` + }) + .replace(/'(.+?)'/gu, function(match, p1){ + placeHolders.push(`"${p1}"`) + return `\uE9b4d${placeHolders.length - 1}` + }) + + .split('//')[0].trim() //remove comments + + .replace(/((number)|(string)|(boolean))\[\]/gu, 'Array<$1>') + + if(content.endsWith(',') || content.endsWith(';')){ + content = content.slice(0, -1) + } + + let spData = content.replace(/ /g, '').split(':') + + if(spData.length !== 2){ + throw "SyntaxError Found" + } + + let [property,typeData] = spData + + switch(typeData){ + case 'string': + case 'number': + case 'boolean':{ + schema.properties[property] = { + type: typeData + } + break + } + case 'Array': + case 'Array': + case 'Array':{ + const ogType = typeData.slice(6,-1) + + schema.properties[property] = { + type: 'array', + items: { + type: ogType as 'string'|'number'|'boolean' + } + } + break + } + default:{ + const types = typeData.split("|") + const strings:string[] = [] + for(const t of types){ + if(!t.startsWith('\uE9b4d')){ + throw "Unsupported Type Detected" + } + const textIndex = t.replace('\uE9b4d','') + const text = placeHolders[parseInt(textIndex)] + const textParsed = JSON.parse(text.replace(/\uE9b4a/gu, '\\"').replace(/\uE9b4b/gu, "\\'")) + strings.push(textParsed) + } + if(strings.length === 1){ + schema.properties[property] = { + type: 'string', + const: strings[0] + } + } + else{ + schema.properties[property] = { + type: 'string', + enum: strings + } + } + } + } + + schema.required.push(property) + + } + return schema +} + +export function getOpenAIJSONSchema(){ + const db = get(DataBase) + const schema = { + "name": "format", + "strict": db.strictJsonSchema, + "schema": convertInterfaceToSchema(db.jsonSchema) + } + return schema +} + +export function extractJSON(data:string, format:string){ + const extract = (data:any, format:string) => { + try { + if(data === undefined || data === null){ + return '' + } + + const fp = format.split('.') + const current = data[fp[0]] + + if(current === undefined){ + return '' + } + else if(fp.length === 1){ + return `${current ?? ''}` + } + else if(typeof current === 'object'){ + return extractJSON(current, fp.slice(1).join('.')) + } + else if(Array.isArray(current)){ + const index = parseInt(fp[1]) + return extractJSON(current[index], fp.slice(1).join('.')) + } + else{ + return `${current ?? ''}` + } + } catch (error) { + return '' + } + } + try { + format = risuChatParser(format) + data = data.trim() + if(data.startsWith('{')){ + return extract(JSON.parse(data), format) + } + } catch (error) {} + return data +} \ No newline at end of file diff --git a/src/ts/process/triggers.ts b/src/ts/process/triggers.ts index 247b6470..3c47a247 100644 --- a/src/ts/process/triggers.ts +++ b/src/ts/process/triggers.ts @@ -1,9 +1,9 @@ -import { parseChatML, risuChatParser, risuCommandParser } from "../parser"; +import { parseChatML, risuChatParser } from "../parser"; import { DataBase, type Chat, type character } from "../storage/database"; import { tokenize } from "../tokenizer"; import { getModuleTriggers } from "./modules"; import { get } from "svelte/store"; -import { CurrentCharacter, CurrentChat, selectedCharID } from "../stores"; +import { CurrentCharacter, CurrentChat, ReloadGUIPointer, selectedCharID } from "../stores"; import { processMultiCommand } from "./command"; import { parseKeyValue } from "../util"; import { alertError, alertInput, alertNormal, alertSelect } from "../alert"; @@ -301,28 +301,34 @@ export async function runTrigger(char:character,mode:triggerMode, arg:{ case'setvar': { const effectValue = risuChatParser(effect.value,{chara:char}) const varKey = risuChatParser(effect.var,{chara:char}) + let originalVar = Number(getVar(varKey)) + if(Number.isNaN(originalVar)){ + originalVar = 0 + } + let resultValue = '' switch(effect.operator){ case '=':{ - setVar(varKey, effectValue) + resultValue = effectValue break } case '+=':{ - setVar(varKey, (Number(getVar(varKey)) + Number(effectValue)).toString()) + resultValue = (originalVar + Number(effectValue)).toString() break } case '-=':{ - setVar(varKey, (Number(getVar(varKey)) - Number(effectValue)).toString()) + resultValue = (originalVar - Number(effectValue)).toString() break } case '*=':{ - setVar(varKey, (Number(getVar(varKey)) * Number(effectValue)).toString()) + resultValue = (originalVar * Number(effectValue)).toString() break } case '/=':{ - setVar(varKey, (Number(getVar(varKey)) / Number(effectValue)).toString()) + resultValue = (originalVar / Number(effectValue)).toString() break } } + setVar(varKey, resultValue) break } case 'systemprompt':{ @@ -498,19 +504,6 @@ export async function runTrigger(char:character,mode:triggerMode, arg:{ setVar(effect.inputVar, res) break } - - case 'triggercode':{ - const triggerCodeResult = await risuCommandParser(effect.code,{ - chara:char, - lowLevelAccess: trigger.lowLevelAccess, - funcName: mode - }) - - if(triggerCodeResult['__stop_chat__'] === '1'){ - stopSending = true - } - break - } case 'triggerlua':{ const triggerCodeResult = await runLua(effect.code,{ lowLevelAccess: trigger.lowLevelAccess, @@ -524,7 +517,7 @@ export async function runTrigger(char:character,mode:triggerMode, arg:{ if(triggerCodeResult.stopSending){ stopSending = true } - chat = triggerCodeResult.chat + chat = get(CurrentChat) break } } @@ -544,6 +537,7 @@ export async function runTrigger(char:character,mode:triggerMode, arg:{ if(varChanged){ const currentChat = get(CurrentChat) currentChat.scriptstate = chat.scriptstate + ReloadGUIPointer.set(get(ReloadGUIPointer) + 1) } return {additonalSysPrompt, chat, tokens:caculatedTokens, stopSending, sendAIprompt} diff --git a/src/ts/process/tts.ts b/src/ts/process/tts.ts index db3e32c2..18b39caf 100644 --- a/src/ts/process/tts.ts +++ b/src/ts/process/tts.ts @@ -2,7 +2,7 @@ import { get } from "svelte/store"; import { alertError } from "../alert"; import { DataBase, type character } from "../storage/database"; import { runTranslator, translateVox } from "../translator/translator"; -import { globalFetch } from "../storage/globalApi"; +import { globalFetch, loadAsset } from "../storage/globalApi"; import { language } from "src/lang"; import { getCurrentCharacter, sleep } from "../util"; import { registerOnnxModel, runVITS } from "./transformers"; @@ -27,7 +27,7 @@ export async function sayTTS(character:character,text:string) { text = text.replace(/\*/g,'') if(character.ttsReadOnlyQuoted){ - const matches = text.match(/"(.*?)"/g) + const matches = text.match(/["「](.*?)["」]/g) if(matches && matches.length > 0){ text = matches.map(match => match.slice(1, -1)).join(""); } @@ -231,12 +231,94 @@ export async function sayTTS(character:character,text:string) { case 'vits':{ await runVITS(text, character.vits) } + case 'gptsovits':{ + const audioContext = new AudioContext(); + + const audio: Uint8Array = await loadAsset(character.gptSoVitsConfig.ref_audio_data.assetId); + const base64Audio = btoa(new Uint8Array(audio).reduce((data, byte) => data + String.fromCharCode(byte), '')); + + const body = { + text: text, + text_lang: character.gptSoVitsConfig.text_lang, + ref_audio_path: undefined, + ref_audio_name: character.gptSoVitsConfig.ref_audio_data.fileName, + ref_audio_data: base64Audio, + prompt_text: undefined, + prompt_lang: character.gptSoVitsConfig.prompt_lang, + top_p: character.gptSoVitsConfig.top_p, + temperature: character.gptSoVitsConfig.temperature, + speed_factor: character.gptSoVitsConfig.speed, + top_k: character.gptSoVitsConfig.top_k, + text_split_method: character.gptSoVitsConfig.text_split_method, + parallel_infer: true, + // media_type: character.gptSoVitsConfig.ref_audio_data.fileName.split('.')[1], + ref_free: character.gptSoVitsConfig.use_long_audio || !character.gptSoVitsConfig.use_prompt, + } + + if (character.gptSoVitsConfig.use_prompt){ + body.prompt_text = character.gptSoVitsConfig.prompt + } + + if (character.gptSoVitsConfig.use_auto_path){ + console.log('auto') + const path = await globalFetch(`${character.gptSoVitsConfig.url}/get_path`, { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + rawResponse: false, + plainFetchDeforce: true, + }) + console.log(path) + if(path.ok){ + body.ref_audio_path = path.data.message + '/public/audio/' + character.gptSoVitsConfig.ref_audio_data.fileName + } + else{ + throw new Error('Failed to Auto get path') + } + } else { + body.ref_audio_path = character.gptSoVitsConfig.ref_audio_path + '/public/audio/' + character.gptSoVitsConfig.ref_audio_data.fileName + } + console.log(body) + + const response = await globalFetch(`${character.gptSoVitsConfig.url}/tts`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: body, + rawResponse: true, + }) + console.log(response) + + if (response.ok) { + const audioBuffer = response.data.buffer; + audioContext.decodeAudioData(audioBuffer, (decodedData) => { + const sourceNode = audioContext.createBufferSource(); + sourceNode.buffer = decodedData; + + const gainNode = audioContext.createGain(); + gainNode.gain.value = character.gptSoVitsConfig.volume || 1.0; + + sourceNode.connect(gainNode); + gainNode.connect(audioContext.destination); + + sourceNode.start(); + }); + } else { + const textBuffer: Uint8Array = response.data.buffer + const text = Buffer.from(textBuffer).toString('utf-8') + throw new Error(text); + } + } } } catch (error) { alertError(`TTS Error: ${error}`) } } + + export const oaiVoices = [ 'alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer' ] diff --git a/src/ts/rpack/LICENSE b/src/ts/rpack/LICENSE new file mode 100644 index 00000000..a3692426 --- /dev/null +++ b/src/ts/rpack/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 2024 Kwaroran + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) 2024 Kwaroran + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/src/ts/rpack/rpack_bg.js b/src/ts/rpack/rpack_bg.js new file mode 100644 index 00000000..cf1413f9 --- /dev/null +++ b/src/ts/rpack/rpack_bg.js @@ -0,0 +1,85 @@ +import init from './rpack_bg.wasm?init'; +let wasm + +let cachedUint8ArrayMemory0 = null; + +function getUint8ArrayMemory0() { + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} + +async function initWasm() { + if(wasm) { + return null + } + const instance = await init() + wasm = instance.exports; + return; +} + +let WASM_VECTOR_LEN = 0; + +function passArray8ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 1, 1) >>> 0; + getUint8ArrayMemory0().set(arg, ptr / 1); + WASM_VECTOR_LEN = arg.length; + return ptr; +} + +let cachedDataViewMemory0 = null; + +function getDataViewMemory0() { + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; +} + +function getArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); +} +/** +* @param {Uint8Array} datas +* @returns {Promise} +*/ +export async function encodeRPack(datas) { + await initWasm(); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(datas, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.encode(retptr, ptr0, len0); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1, 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +/** +* @param {Uint8Array} datas +* @returns {Promise} +*/ +export async function decodeRPack(datas) { + await initWasm(); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(datas, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.decode(retptr, ptr0, len0); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1, 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + diff --git a/src/ts/rpack/rpack_bg.wasm b/src/ts/rpack/rpack_bg.wasm new file mode 100644 index 00000000..877e84f4 Binary files /dev/null and b/src/ts/rpack/rpack_bg.wasm differ diff --git a/src/ts/storage/accountStorage.ts b/src/ts/storage/accountStorage.ts index 41d1fd00..5ac66973 100644 --- a/src/ts/storage/accountStorage.ts +++ b/src/ts/storage/accountStorage.ts @@ -2,12 +2,14 @@ import { get, writable } from "svelte/store" import { DataBase } from "./database" import { hubURL } from "../characterCards" import localforage from "localforage" -import { alertLogin, alertStore } from "../alert" +import { alertError, alertLogin, alertStore, alertWait } from "../alert" import { forageStorage, getUnpargeables, replaceDbResources } from "./globalApi" import { encodeRisuSave } from "./risuSave" import { v4 } from "uuid" +import { language } from "src/lang" export const AccountWarning = writable('') +const risuSession = Date.now().toFixed(0) let seenWarnings:string[] = [] @@ -26,7 +28,8 @@ export class AccountStorage{ 'content-type': 'application/json', 'x-risu-key': key, 'x-risu-auth': this.auth, - 'X-Format': 'nocheck' + 'X-Format': 'nocheck', + 'x-risu-session': risuSession } }) if(da.headers.get('Content-Type') === 'application/json'){ @@ -37,6 +40,11 @@ export class AccountStorage{ AccountWarning.set(json.warning) } } + if(json?.reloadSession){ + alertWait(language.reloadSession) + location.reload() + return + } } if(da.status === 304){ diff --git a/src/ts/storage/autoStorage.ts b/src/ts/storage/autoStorage.ts index 1157b171..2c599b4d 100644 --- a/src/ts/storage/autoStorage.ts +++ b/src/ts/storage/autoStorage.ts @@ -2,7 +2,7 @@ import localforage from "localforage" import { isNodeServer, replaceDbResources } from "./globalApi" import { NodeStorage } from "./nodeStorage" import { OpfsStorage } from "./opfsStorage" -import { alertSelect, alertStore } from "../alert" +import { alertInput, alertSelect, alertStore } from "../alert" import { get } from "svelte/store" import { DataBase, type Database } from "./database" import { AccountStorage } from "./accountStorage" @@ -67,6 +67,13 @@ export class AutoStorage{ return true } } + + const confirm = await alertInput(`to overwrite your data, type "RISUAI"`) + if(confirm !== "RISUAI"){ + localStorage.setItem('dosync', 'avoid') + return false + } + let replaced:{[key:string]:string} = {} for(const key of keys){ diff --git a/src/ts/storage/database.ts b/src/ts/storage/database.ts index f0c80c32..35bbdd6f 100644 --- a/src/ts/storage/database.ts +++ b/src/ts/storage/database.ts @@ -1,6 +1,6 @@ export const DataBase = writable({} as any as Database) export const loadedStore = writable(false) -export let appVer = "124.2.2" +export let appVer = "136.0.1" export let webAppSubVer = '' import { get, writable } from 'svelte/store'; @@ -428,7 +428,21 @@ export function setDatabase(data:Database){ negInputName: 'text', timeout: 30 } - + data.hideApiKey ??= true + data.unformatQuotes ??= false + data.ttsAutoSpeech ??= false + data.translatorInputLanguage ??= 'auto' + data.falModel ??= 'fal-ai/flux/dev' + data.falLoraScale ??= 1 + data.customCSS ??= '' + data.strictJsonSchema ??= true + data.statics ??= { + messages: 0, + imports: 0 + } + data.customQuotes ??= false + data.customQuotesData ??= ['“','”','‘','’'] + data.groupOtherBotRole ??= 'user' changeLanguage(data.language) DataBase.set(data) } @@ -508,6 +522,7 @@ export interface Database{ NAII2I:boolean NAIREF:boolean NAIImgConfig:NAIImgConfig + ttsAutoSpeech?:boolean runpodKey:string promptPreprocess:boolean bias: [string, number][] @@ -612,6 +627,7 @@ export interface Database{ emotionProcesser:'submodel'|'embedding', showMenuChatList?:boolean, translatorType:'google'|'deepl'|'none'|'llm'|'deeplX', + translatorInputLanguage?:string NAIadventure?:boolean, NAIappendName?:boolean, deeplOptions:{ @@ -710,6 +726,30 @@ export interface Database{ comfyUiUrl: string useLegacyGUI: boolean claudeCachingExperimental: boolean + hideApiKey: boolean + unformatQuotes: boolean + enableDevTools: boolean + falToken: string + falModel: string + falLora: string + falLoraName: string + falLoraScale: number + moduleIntergration: string + customCSS: string + betaMobileGUI:boolean + jsonSchemaEnabled:boolean + jsonSchema:string + strictJsonSchema:boolean + extractJson:string + ai21Key:string + statics: { + messages: number + imports: number + } + customQuotes:boolean + customQuotesData?:[string, string, string, string] + groupTemplate?:string + groupOtherBotRole?:string } export interface customscript{ @@ -802,6 +842,27 @@ export interface character{ voice?: string version?: string } + gptSoVitsConfig?:{ + url?:string + use_auto_path?:boolean + ref_audio_path?:string + use_long_audio?:boolean + ref_audio_data?: { + fileName:string + assetId:string + } + volume?:number + text_lang?: "auto" | "auto_yue" | "en" | "zh" | "ja" | "yue" | "ko" | "all_zh" | "all_ja" | "all_yue" | "all_ko" + text?:string + use_prompt?:boolean + prompt?:string | null + prompt_lang?: "auto" | "auto_yue" | "en" | "zh" | "ja" | "yue" | "ko" | "all_zh" | "all_ja" | "all_yue" | "all_ko" + top_p?:number + temperature?:number + speed?:number + top_k?:number + text_split_method?: "cut0" | "cut1" | "cut2" | "cut3" | "cut4" | "cut5" + } supaMemory?:boolean additionalAssets?:[string, string, string][] ttsReadOnlyQuoted?:boolean @@ -842,6 +903,8 @@ export interface character{ defaultVariables?:string lowLevelAccess?:boolean hideChatIcon?:boolean + lastInteraction?:number + translatorNote?:string } @@ -890,6 +953,7 @@ export interface groupChat{ defaultVariables?:string lowLevelAccess?:boolean hideChatIcon?:boolean + lastInteraction?:number } export interface botPreset{ @@ -939,6 +1003,16 @@ export interface botPreset{ useInstructPrompt?:boolean customPromptTemplateToggle?:string templateDefaultVariables?:string + moduleIntergration?:string + top_k?:number + instructChatTemplate?:string + JinjaTemplate?:string + jsonSchemaEnabled?:boolean + jsonSchema?:string + strictJsonSchema?:boolean + extractJson?:string + groupTemplate?:string + groupOtherBotRole?:string } @@ -1009,6 +1083,7 @@ export interface Chat{ modules?:string[] id?:string bindedPersona?:string + fmIndex?:number } export interface Message{ @@ -1018,6 +1093,8 @@ export interface Message{ chatId?:string time?: number generationInfo?: MessageGenerationInfo + name?:string + otherUser?:boolean } export interface MessageGenerationInfo{ @@ -1040,7 +1117,7 @@ interface AINsettings{ top_k:number } -interface OobaSettings{ +export interface OobaSettings{ max_new_tokens: number, do_sample: boolean, temperature: number, @@ -1218,6 +1295,16 @@ export function saveCurrentPreset(){ useInstructPrompt: db.useInstructPrompt, customPromptTemplateToggle: db.customPromptTemplateToggle ?? "", templateDefaultVariables: db.templateDefaultVariables ?? "", + moduleIntergration: db.moduleIntergration ?? "", + top_k: db.top_k, + instructChatTemplate: db.instructChatTemplate, + JinjaTemplate: db.JinjaTemplate ?? '', + jsonSchemaEnabled:db.jsonSchemaEnabled??false, + jsonSchema:db.jsonSchema ?? '', + strictJsonSchema:db.strictJsonSchema ?? true, + extractJson:db.extractJson ?? '', + groupOtherBotRole: db.groupOtherBotRole ?? 'user', + groupTemplate: db.groupTemplate ?? '', } db.botPresets = pres setDatabase(db) @@ -1302,6 +1389,16 @@ export function setPreset(db:Database, newPres: botPreset){ db.useInstructPrompt = newPres.useInstructPrompt ?? false db.customPromptTemplateToggle = newPres.customPromptTemplateToggle ?? '' db.templateDefaultVariables = newPres.templateDefaultVariables ?? '' + db.moduleIntergration = newPres.moduleIntergration ?? '' + db.top_k = newPres.top_k ?? db.top_k + db.instructChatTemplate = newPres.instructChatTemplate ?? db.instructChatTemplate + db.JinjaTemplate = newPres.JinjaTemplate ?? db.JinjaTemplate + db.jsonSchemaEnabled = newPres.jsonSchemaEnabled ?? false + db.jsonSchema = newPres.jsonSchema ?? '' + db.strictJsonSchema = newPres.strictJsonSchema ?? true + db.extractJson = newPres.extractJson ?? '' + db.groupOtherBotRole = newPres.groupOtherBotRole ?? 'user' + db.groupTemplate = newPres.groupTemplate ?? '' return db } @@ -1310,6 +1407,7 @@ import * as fflate from "fflate"; import type { OnnxModelFiles } from '../process/transformers'; import type { RisuModule } from '../process/modules'; import type { HypaV2Data } from '../process/memory/hypav2'; +import { decodeRPack, encodeRPack } from '../rpack/rpack_bg'; export async function downloadPreset(id:number, type:'json'|'risupreset'|'return' = 'json'){ saveCurrentPreset() @@ -1334,8 +1432,10 @@ export async function downloadPreset(id:number, type:'json'|'risupreset'|'return 'risupreset' ) })) + if(type === 'risupreset'){ - downloadFile(pres.name + "_preset.risupreset", buf) + const buf2 = await encodeRPack(buf) + downloadFile(pres.name + "_preset.risup", buf2) } else{ return { @@ -1361,14 +1461,18 @@ export async function importPreset(f:{ data:Uint8Array }|null = null){ if(!f){ - f = await selectSingleFile(["json", "preset", "risupreset"]) + f = await selectSingleFile(["json", "preset", "risupreset", "risup"]) } if(!f){ return } let pre:any - if(f.name.endsWith('.risupreset')){ - const decoded = await decodeMsgpack(fflate.decompressSync(f.data)) + if(f.name.endsWith('.risupreset') || f.name.endsWith('.risup')){ + let data = f.data + if(f.name.endsWith('.risup')){ + data = await decodeRPack(data) + } + const decoded = await decodeMsgpack(fflate.decompressSync(data)) console.log(decoded) if((decoded.presetVersion === 0 || decoded.presetVersion === 2) && decoded.type === 'preset'){ pre = {...presetTemplate,...decodeMsgpack(Buffer.from(await decryptBuffer(decoded.preset ?? decoded.pres, 'risupreset')))} diff --git a/src/ts/storage/globalApi.ts b/src/ts/storage/globalApi.ts index 95093e42..07cf9243 100644 --- a/src/ts/storage/globalApi.ts +++ b/src/ts/storage/globalApi.ts @@ -1,18 +1,24 @@ -import { writeBinaryFile,BaseDirectory, readBinaryFile, exists, createDir, readDir, removeFile } from "@tauri-apps/api/fs" - +import { + writeFile, + BaseDirectory, + readFile, + exists, + mkdir, + readDir, + remove +} from "@tauri-apps/plugin-fs" import { changeFullscreen, checkNullish, findCharacterbyId, sleep } from "../util" -import { convertFileSrc, invoke } from "@tauri-apps/api/tauri" +import { convertFileSrc, invoke } from "@tauri-apps/api/core" import { v4 as uuidv4, v4 } from 'uuid'; import { appDataDir, join } from "@tauri-apps/api/path"; import { get } from "svelte/store"; -import {open} from '@tauri-apps/api/shell' +import {open} from '@tauri-apps/plugin-shell' import { DataBase, loadedStore, setDatabase, type Database, defaultSdDataFunc } from "./database"; -import { appWindow } from "@tauri-apps/api/window"; +import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow"; import { checkRisuUpdate } from "../update"; -import { botMakerMode, selectedCharID } from "../stores"; -import { Body, ResponseType, fetch as TauriFetch } from "@tauri-apps/api/http"; +import { MobileGUI, botMakerMode, selectedCharID } from "../stores"; import { loadPlugins } from "../plugins/plugins"; -import { alertConfirm, alertError, alertNormal, alertNormalWait, alertSelect } from "../alert"; +import { alertConfirm, alertError, alertNormal, alertNormalWait, alertSelect, alertTOS, alertWait } from "../alert"; import { checkDriverInit, syncDrive } from "../drive/drive"; import { hasher } from "../parser"; import { characterURLImport, hubURL } from "../characterCards"; @@ -21,11 +27,11 @@ import { loadRisuAccountData } from "../drive/accounter"; import { decodeRisuSave, encodeRisuSave } from "./risuSave"; import { AutoStorage } from "./autoStorage"; import { updateAnimationSpeed } from "../gui/animation"; -import { updateColorScheme, updateTextTheme } from "../gui/colorscheme"; +import { updateColorScheme, updateTextThemeAndCSS } from "../gui/colorscheme"; import { saveDbKei } from "../kei/backup"; import { Capacitor, CapacitorHttp } from '@capacitor/core'; import * as CapFS from '@capacitor/filesystem' -import { save } from "@tauri-apps/api/dialog"; +import { save } from "@tauri-apps/plugin-dialog"; import type { RisuModule } from "../process/modules"; import { listen } from '@tauri-apps/api/event' import { registerPlugin } from '@capacitor/core'; @@ -35,13 +41,18 @@ import { removeDefaultHandler } from "src/main"; import { updateGuisize } from "../gui/guisize"; import { encodeCapKeySafe } from "./mobileStorage"; import { updateLorebooks } from "../characters"; +import { initMobileGesture } from "../hotkey"; +import { fetch as TauriHTTPFetch } from '@tauri-apps/plugin-http'; //@ts-ignore -export const isTauri = !!window.__TAURI__ +export const isTauri = !!window.__TAURI_INTERNALS__ //@ts-ignore export const isNodeServer = !!globalThis.__NODE__ export const forageStorage = new AutoStorage() export const googleBuild = false +export const isMobile = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i) + +const appWindow = isTauri ? getCurrentWebviewWindow() : null interface fetchLog{ body:string @@ -56,26 +67,6 @@ interface fetchLog{ let fetchLog:fetchLog[] = [] -async function writeBinaryFileFast(appPath: string, data: Uint8Array) { - const secret = await invoke('get_http_secret') as string; - const port = await invoke('get_http_port') as number; - - const apiUrl = `http://127.0.0.1:${port}/?path=${encodeURIComponent(appPath)}`; - - const response = await fetch(apiUrl, { - method: 'POST', - headers: { - 'Content-Type': 'application/octet-stream', - 'x-tauri-secret': secret - }, - body: new Blob([data]) - }); - - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } -} - export async function downloadFile(name:string, dat:Uint8Array|ArrayBuffer|string) { if(typeof(dat) === 'string'){ dat = Buffer.from(dat, 'utf-8') @@ -92,7 +83,7 @@ export async function downloadFile(name:string, dat:Uint8Array|ArrayBuffer|strin } if(isTauri){ - await writeBinaryFile(name, data, {dir: BaseDirectory.Download}) + await writeFile(name, data, {baseDir: BaseDirectory.Download}) } else{ downloadURL(`data:png/image;base64,${Buffer.from(data).toString('base64')}`, name) @@ -183,7 +174,7 @@ export async function getFileSrc(loc:string) { return "/sw/img/" + encoded } else{ - const f:Uint8Array = await forageStorage.getItem(loc) + const f:Uint8Array = await forageStorage.getItem(loc) as unknown as Uint8Array await fetch("/sw/register/" + encoded, { method: "POST", body: f @@ -212,7 +203,7 @@ export async function getFileSrc(loc:string) { ind = fileCache.origin.length fileCache.origin.push(loc) fileCache.res.push('loading') - const f:Uint8Array = await forageStorage.getItem(loc) + const f:Uint8Array = await forageStorage.getItem(loc) as unknown as Uint8Array fileCache.res[ind] = f return `data:image/png;base64,${Buffer.from(f).toString('base64')}` } @@ -247,12 +238,12 @@ export async function readImage(data:string) { if(appDataDirPath === ''){ appDataDirPath = await appDataDir(); } - return await readBinaryFile(await join(appDataDirPath,data)) + return await readFile(await join(appDataDirPath,data)) } - return await readBinaryFile(data) + return await readFile(data) } else{ - return (await forageStorage.getItem(data) as Uint8Array) + return (await forageStorage.getItem(data) as unknown as Uint8Array) } } @@ -281,7 +272,9 @@ export async function saveAsset(data:Uint8Array, customId:string = '', fileName: fileExtension = fileName.split('.').pop() } if(isTauri){ - await writeBinaryFileFast(`assets/${id}.${fileExtension}`, data); + await writeFile(`assets/${id}.${fileExtension}`, data, { + baseDir: BaseDirectory.AppData + }); return `assets/${id}.${fileExtension}` } else{ @@ -302,10 +295,10 @@ export async function saveAsset(data:Uint8Array, customId:string = '', fileName: */ export async function loadAsset(id:string){ if(isTauri){ - return await readBinaryFile(id,{dir: BaseDirectory.AppData}) + return await readFile(id,{baseDir: BaseDirectory.AppData}) } else{ - return await forageStorage.getItem(id) as Uint8Array + return await forageStorage.getItem(id) as unknown as Uint8Array } } @@ -336,8 +329,8 @@ export async function saveDb(){ } if(!gotChannel){ gotChannel = true - await alertNormalWait(language.activeTabChange) - gotChannel = false + alertWait(language.activeTabChange) + location.reload() } } } @@ -358,8 +351,8 @@ export async function saveDb(){ db.saveTime = Math.floor(Date.now() / 1000) if(isTauri){ const dbData = encodeRisuSave(db) - await writeBinaryFileFast('database/database.bin', dbData); - await writeBinaryFileFast(`database/dbbackup-${(Date.now()/100).toFixed()}.bin`, dbData); + await writeFile('database/database.bin', dbData, {baseDir: BaseDirectory.AppData}); + await writeFile(`database/dbbackup-${(Date.now()/100).toFixed()}.bin`, dbData, {baseDir: BaseDirectory.AppData}); } else{ if(!forageStorage.isAccount){ @@ -405,7 +398,7 @@ async function getDbBackups() { return [] } if(isTauri){ - const keys = await readDir('database', {dir: BaseDirectory.AppData}) + const keys = await readDir('database', {baseDir: BaseDirectory.AppData}) let backups:number[] = [] for(const key of keys){ if(key.name.startsWith("dbbackup-")){ @@ -417,7 +410,7 @@ async function getDbBackups() { backups.sort((a, b) => b - a) while(backups.length > 20){ const last = backups.pop() - await removeFile(`database/dbbackup-${last}.bin`,{dir: BaseDirectory.AppData}) + await remove(`database/dbbackup-${last}.bin`,{baseDir: BaseDirectory.AppData}) } return backups } @@ -452,27 +445,27 @@ export async function loadData() { try { if(isTauri){ appWindow.maximize() - if(!await exists('', {dir: BaseDirectory.AppData})){ - await createDir('', {dir: BaseDirectory.AppData}) + if(!await exists('', {baseDir: BaseDirectory.AppData})){ + await mkdir('', {baseDir: BaseDirectory.AppData}) } - if(!await exists('database', {dir: BaseDirectory.AppData})){ - await createDir('database', {dir: BaseDirectory.AppData}) + if(!await exists('database', {baseDir: BaseDirectory.AppData})){ + await mkdir('database', {baseDir: BaseDirectory.AppData}) } - if(!await exists('assets', {dir: BaseDirectory.AppData})){ - await createDir('assets', {dir: BaseDirectory.AppData}) + if(!await exists('assets', {baseDir: BaseDirectory.AppData})){ + await mkdir('assets', {baseDir: BaseDirectory.AppData}) } - if(!await exists('database/database.bin', {dir: BaseDirectory.AppData})){ - await writeBinaryFileFast('database/database.bin', encodeRisuSave({})); + if(!await exists('database/database.bin', {baseDir: BaseDirectory.AppData})){ + await writeFile('database/database.bin', encodeRisuSave({}), {baseDir: BaseDirectory.AppData}); } try { - const decoded = decodeRisuSave(await readBinaryFile('database/database.bin',{dir: BaseDirectory.AppData})) + const decoded = decodeRisuSave(await readFile('database/database.bin',{baseDir: BaseDirectory.AppData})) setDatabase(decoded) } catch (error) { const backups = await getDbBackups() let backupLoaded = false for(const backup of backups){ try { - const backupData = await readBinaryFile(`database/dbbackup-${backup}.bin`,{dir: BaseDirectory.AppData}) + const backupData = await readFile(`database/dbbackup-${backup}.bin`,{baseDir: BaseDirectory.AppData}) setDatabase( decodeRisuSave(backupData) ) @@ -490,7 +483,7 @@ export async function loadData() { } else{ - let gotStorage:Uint8Array = await forageStorage.getItem('database/database.bin') + let gotStorage:Uint8Array = await forageStorage.getItem('database/database.bin') as unknown as Uint8Array if(checkNullish(gotStorage)){ gotStorage = encodeRisuSave({}) await forageStorage.setItem('database/database.bin', gotStorage) @@ -505,7 +498,7 @@ export async function loadData() { let backupLoaded = false for(const backup of backups){ try { - const backupData:Uint8Array = await forageStorage.getItem(`database/dbbackup-${backup}.bin`) + const backupData:Uint8Array = await forageStorage.getItem(`database/dbbackup-${backup}.bin`) as unknown as Uint8Array setDatabase( decodeRisuSave(backupData) ) @@ -517,7 +510,7 @@ export async function loadData() { } } if(await forageStorage.checkAccountSync()){ - let gotStorage:Uint8Array = await forageStorage.getItem('database/database.bin') + let gotStorage:Uint8Array = await forageStorage.getItem('database/database.bin') as unknown as Uint8Array if(checkNullish(gotStorage)){ gotStorage = encodeRisuSave({}) await forageStorage.setItem('database/database.bin', gotStorage) @@ -531,7 +524,7 @@ export async function loadData() { let backupLoaded = false for(const backup of backups){ try { - const backupData:Uint8Array = await forageStorage.getItem(`database/dbbackup-${backup}.bin`) + const backupData:Uint8Array = await forageStorage.getItem(`database/dbbackup-${backup}.bin`) as unknown as Uint8Array setDatabase( decodeRisuSave(backupData) ) @@ -568,11 +561,20 @@ export async function loadData() { try { await loadRisuAccountData() } catch (error) {} + } + try { + //@ts-ignore + const isInStandaloneMode = (window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone) || document.referrer.includes('android-app://'); + if(isInStandaloneMode){ + await navigator.storage.persist() + } + } catch (error) { + } await checkNewFormat() const db = get(DataBase); updateColorScheme() - updateTextTheme() + updateTextThemeAndCSS() updateAnimationSpeed() updateHeightMode() updateErrorHandling() @@ -580,10 +582,21 @@ export async function loadData() { if(db.botSettingAtStart){ botMakerMode.set(true) } + if((db.betaMobileGUI && window.innerWidth <= 800) || import.meta.env.VITE_RISU_LITE === 'TRUE'){ + initMobileGesture() + MobileGUI.set(true) + } loadedStore.set(true) selectedCharID.set(-1) startObserveDom() - saveDb() + saveDb() + if(import.meta.env.VITE_RISU_TOS === 'TRUE'){ + alertTOS().then((a) => { + if(a === false){ + location.reload() + } + }) + } } catch (error) { alertError(`${error}`) } @@ -639,6 +652,7 @@ const knownHostes = ["localhost", "127.0.0.1", "0.0.0.0"]; */ interface GlobalFetchArgs { plainFetchForce?: boolean; + plainFetchDeforce?: boolean; body?: any; headers?: { [key: string]: string }; rawResponse?: boolean; @@ -712,8 +726,8 @@ export async function globalFetch(url: string, arg: GlobalFetchArgs = {}): Promi if (arg.abortSignal?.aborted) { return { ok: false, data: 'aborted', headers: {} }; } - const urlHost = new URL(url).hostname; - const forcePlainFetch = (knownHostes.includes(urlHost) && !isTauri) || db.usePlainFetch || arg.plainFetchForce; + const urlHost = new URL(url).hostname + const forcePlainFetch = ((knownHostes.includes(urlHost) && !isTauri) || db.usePlainFetch || arg.plainFetchForce) && !arg.plainFetchDeforce if (knownHostes.includes(urlHost) && !isTauri && !isNodeServer) { return { ok: false, headers: {}, data: 'You are trying local request on web version. This is not allowed due to browser security policy. Use the desktop version instead, or use a tunneling service like ngrok and set the CORS to allow all.' }; @@ -802,41 +816,19 @@ async function fetchWithPlainFetch(url: string, arg: GlobalFetchArgs): Promise} - The result of the fetch request. */ async function fetchWithTauri(url: string, arg: GlobalFetchArgs): Promise { - const body = !arg.body ? null : arg.body instanceof URLSearchParams ? Body.text(arg.body.toString()) : Body.json(arg.body); - const headers = arg.headers ?? {}; - const fetchPromise = TauriFetch(url, { - body, - method: arg.method ?? 'POST', - headers, - timeout: { secs: get(DataBase).timeOut, nanos: 0 }, - responseType: arg.rawResponse ? ResponseType.Binary : ResponseType.JSON, - }); - - let abortFn = () => {}; - const abortPromise = new Promise<"aborted">((res, rej) => { - abortFn = () => res("aborted"); - arg.abortSignal?.addEventListener('abort', abortFn); - }); - - const result = await Promise.any([fetchPromise, abortPromise]); - arg.abortSignal?.removeEventListener('abort', abortFn); - - if (result === 'aborted') { - return { ok: false, data: 'aborted', headers: {} }; - } - - const data = arg.rawResponse ? new Uint8Array(result.data as number[]) : result.data; - addFetchLogInGlobalFetch(data, result.ok, url, arg); - return { ok: result.ok, data, headers: result.headers }; + try { + const headers = { 'Content-Type': 'application/json', ...arg.headers }; + const response = await TauriHTTPFetch(new URL(url), { body: JSON.stringify(arg.body), headers, method: arg.method ?? "POST", signal: arg.abortSignal }); + const data = arg.rawResponse ? new Uint8Array(await response.arrayBuffer()) : await response.json(); + const ok = response.status >= 200 && response.status < 300; + addFetchLogInGlobalFetch(data, ok, url, arg); + return { ok, data, headers: Object.fromEntries(response.headers) }; + } catch (error) { + + } } -/** - * Performs a fetch request using Capacitor. - * - * @param {string} url - The URL to fetch. - * @param {GlobalFetchArgs} arg - The arguments for the fetch request. - * @returns {Promise} - The result of the fetch request. - */ +// Decoupled globalFetch built-in function async function fetchWithCapacitor(url: string, arg: GlobalFetchArgs): Promise { const { body, headers = {}, rawResponse } = arg; headers["Content-Type"] = body instanceof URLSearchParams ? "application/x-www-form-urlencoded" : "application/json"; @@ -992,7 +984,18 @@ export function getUnpargeables(db: Database, uptype: 'basename' | 'pure' = 'bas } } - if (db.personas) { + if(db.modules){ + for(const module of db.modules){ + const assets = module.assets + if(assets){ + for(const asset of assets){ + addUnparge(asset[1]) + } + } + } + } + + if(db.personas){ db.personas.map((v) => { addUnparge(v.icon); }); @@ -1280,13 +1283,13 @@ async function pargeChunks(){ const unpargeable = getUnpargeables(db) if(isTauri){ - const assets = await readDir('assets', {dir: BaseDirectory.AppData}) + const assets = await readDir('assets', {baseDir: BaseDirectory.AppData}) for(const asset of assets){ const n = getBasename(asset.name) if(unpargeable.includes(n)){ } else{ - await removeFile(asset.path) + await remove(asset.name, {baseDir: BaseDirectory.AppData}) } } } @@ -1401,7 +1404,7 @@ export class TauriWriter{ * @param {Uint8Array} data - The data to write. */ async write(data:Uint8Array) { - await writeBinaryFile(this.path, data, { + await writeFile(this.path, data, { append: !this.firstWrite }) this.firstWrite = false @@ -1864,7 +1867,7 @@ export async function fetchNative(url:string, arg:{ const data = nativeFetchData[fetchId].shift() if(data.type === 'chunk'){ const chunk = Buffer.from(data.body, 'base64') - controller.enqueue(chunk) + controller.enqueue(chunk as unknown as Uint8Array) } if(data.type === 'headers'){ resHeaders = data.body @@ -2040,7 +2043,7 @@ export class BlankWriter{ export async function loadInternalBackup(){ - const keys = isTauri ? (await readDir('database', {dir: BaseDirectory.AppData})).map((v) => { + const keys = isTauri ? (await readDir('database', {baseDir: BaseDirectory.AppData})).map((v) => { return v.name }) : (await forageStorage.keys()) let internalBackups:string[] = [] @@ -2068,11 +2071,11 @@ export async function loadInternalBackup(){ const selectedBackup = internalBackups[alertResult] const data = isTauri ? ( - await readBinaryFile('database/' + selectedBackup, {dir: BaseDirectory.AppData}) + await readFile('database/' + selectedBackup, {baseDir: BaseDirectory.AppData}) ) : (await forageStorage.getItem(selectedBackup)) setDatabase( - decodeRisuSave(data) + decodeRisuSave(Buffer.from(data) as unknown as Uint8Array) ) await alertNormal('Loaded backup') diff --git a/src/ts/stores.ts b/src/ts/stores.ts index 2b3a6f2d..5d75fc73 100644 --- a/src/ts/stores.ts +++ b/src/ts/stores.ts @@ -26,9 +26,12 @@ export const ViewBoxsize = writable({ width: 12 * 16, height: 12 * 16 }); // Def export const settingsOpen = writable(false) export const botMakerMode = writable(false) export const moduleBackgroundEmbedding = writable('') - +export const openPresetList = writable(false) +export const openPersonaList = writable(false) +export const MobileGUI = writable(false) +export const MobileGUIStack = writable(0) +export const MobileSideBar = writable(0) //optimization - export const CurrentCharacter = writable(null) as Writable export const CurrentSimpleCharacter = writable(null) as Writable export const CurrentChat = writable(null) as Writable @@ -37,18 +40,37 @@ export const CurrentUserIcon = writable('') as Writable export const CurrentShowMemoryLimit = writable(false) as Writable export const ShowVN = writable(false) export const SettingsMenuIndex = writable(-1) -export const CurrentVariablePointer = writable({} as {[key:string]: string|number|boolean}) export const ReloadGUIPointer = writable(0) export const OpenRealmStore = writable(false) export const ShowRealmFrameStore = writable('') export const PlaygroundStore = writable(0) export const HideIconStore = writable(false) export const UserIconProtrait = writable(false) +export const CustomCSSStore = writable('') +export const SafeModeStore = writable(false) +export const MobileSearch = writable('') +export const CharConfigSubMenu = writable(0) + let lastGlobalEnabledModules: string[] = [] let lastChatEnabledModules: string[] = [] let moduleHideIcon = false let characterHideIcon = false + +CustomCSSStore.subscribe((css) => { + console.log(css) + const q = document.querySelector('#customcss') + if(q){ + q.innerHTML = css + } + else{ + const s = document.createElement('style') + s.id = 'customcss' + s.innerHTML = css + document.body.appendChild(s) + } +}) + function createSimpleCharacter(char:character|groupChat){ if((!char) || char.type === 'group'){ return null @@ -208,13 +230,6 @@ async function preInit(){ if(getUserIcon() !== get(CurrentUserIcon)){ CurrentUserIcon.set(getUserIcon()) } - - const variablePointer = get(CurrentVariablePointer) - const currentState = structuredClone(chat?.scriptstate) - - if(!isEqual(variablePointer, currentState)){ - CurrentVariablePointer.set(currentState) - } }) } @@ -226,9 +241,7 @@ function onModuleUpdate(){ lastChatEnabledModules = [] } - const m = getModules([ - ...lastGlobalEnabledModules, ...lastChatEnabledModules - ]) + const m = getModules() let moduleHideIcon = false let backgroundEmbedding = '' diff --git a/src/ts/sync/multiuser.ts b/src/ts/sync/multiuser.ts index e78a0c18..f370c504 100644 --- a/src/ts/sync/multiuser.ts +++ b/src/ts/sync/multiuser.ts @@ -1,23 +1,65 @@ import { v4 } from 'uuid'; -import { alertError, alertInput, alertNormal, alertWait } from '../alert'; -import { get } from 'svelte/store'; -import { DataBase, setDatabase, type character, saveImage } from '../storage/database'; -import { selectedCharID } from '../stores'; +import { alertError, alertInput, alertNormal, alertStore, alertWait } from '../alert'; +import { get, writable } from 'svelte/store'; +import { DataBase, setDatabase, type character, saveImage, type Chat } from '../storage/database'; +import { CurrentChat, selectedCharID } from '../stores'; import { findCharacterIndexbyId, sleep } from '../util'; import type { DataConnection, Peer } from 'peerjs'; import { readImage } from '../storage/globalApi'; +import { doingChat } from '../process'; async function importPeerJS(){ return await import('peerjs'); } +interface ReciveFirst{ + type: 'receive-char', + data: character +} +interface RequestFirst{ + type: 'request-char' +} +interface ReciveAsset{ + type: 'receive-asset', + id: string, + data: Uint8Array +} +interface RequestSync{ + type: 'request-chat-sync', + id: string, + data: Chat +} +interface ReciveSync{ + type: 'receive-chat', + data: Chat +} +interface RequestChatSafe{ + type: 'request-chat-safe', + id: string +} +interface ResponseChatSafe{ + type: 'response-chat-safe' + data: boolean, + id: string +} +interface RequestChat{ + type: 'request-chat' +} + +type ReciveData = ReciveFirst|RequestFirst|ReciveAsset|RequestSync|ReciveSync|RequestChatSafe|ResponseChatSafe|RequestChat + let conn:DataConnection let peer:Peer let connections:DataConnection[] = [] -let connectionOpen = false +export let connectionOpen = false +let requestChatSafeQueue = new Map() +export let ConnectionOpenStore = writable(false) +export let ConnectionIsHost = writable(false) +export let RoomIdStore = writable('') export async function createMultiuserRoom(){ //create a room with webrtc + ConnectionIsHost.set(true) alertWait("Loading...") const peerJS = await importPeerJS(); @@ -93,7 +135,96 @@ export async function createMultiuserRoom(){ return } char.chats[char.chatPage] = recivedChar.chats[0] - sendPeerChar() + } + if(data.type === 'request-chat-sync'){ + const db = get(DataBase) + const selectedCharId = get(selectedCharID) + const char = db.characters[selectedCharId] + char.chats[char.chatPage] = data.data + db.characters[selectedCharId] = char + latestSyncChat = data.data + setDatabase(db) + + for(const connection of connections){ + if(connection.connectionId === conn.connectionId){ + continue + } + const rs:ReciveSync = { + type: 'receive-chat', + data: data.data + } + connection.send(rs) + } + } + if(data.type === 'request-chat'){ + const db = get(DataBase) + const selectedCharId = get(selectedCharID) + const char = db.characters[selectedCharId] + const chat = char.chats[char.chatPage] + const rs:ReciveSync = { + type: 'receive-chat', + data: chat + } + conn.send(rs) + } + if(data.type === 'request-chat-safe'){ + const queue = { + remaining: connections.length, + safe: true, + conn: conn + } + requestChatSafeQueue.set(data.id, queue) + for(const connection of connections){ + if(connection.connectionId === conn.connectionId){ + queue.remaining-- + requestChatSafeQueue.set(data.id, queue) + continue + } + const rs:RequestChatSafe = { + type: 'request-chat-safe', + id: data.id + } + connection.send(rs) + } + if(queue.remaining === 0){ + if(waitingMultiuserId === data.id){ + waitingMultiuserId = '' + waitingMultiuserSafe = queue.safe + } + else if(queue.conn){ + const rs:ResponseChatSafe = { + type: 'response-chat-safe', + data: queue.safe, + id: data.id + } + queue.conn.send(rs) + requestChatSafeQueue.delete(data.id) + } + } + } + if(data.type === 'response-chat-safe'){ + const queue = requestChatSafeQueue.get(data.id) + if(queue){ + queue.remaining-- + if(!data.data){ + queue.safe = false + } + if(queue.remaining === 0){ + if(waitingMultiuserId === data.id){ + waitingMultiuserId = '' + waitingMultiuserSafe = queue.safe + } + else if(queue.conn){ + const rs:ResponseChatSafe = { + type: 'response-chat-safe', + data: queue.safe, + id: data.id + } + queue.conn.send(rs) + requestChatSafeQueue.delete(data.id) + } + } + } } }); @@ -111,28 +242,23 @@ export async function createMultiuserRoom(){ } connectionOpen = true - alertNormal("Room ID: " + roomId) + ConnectionOpenStore.set(true) + RoomIdStore.set(roomId) + alertStore.set({ + type: 'none', + msg: '' + }) return } -interface ReciveFirst{ - type: 'receive-char', - data: character -} -interface RequestFirst{ - type: 'request-char' -} -interface ReciveAsset{ - type: 'receive-asset', - id: string, - data: Uint8Array -} - -type ReciveData = ReciveFirst|RequestFirst|ReciveAsset +let waitingMultiuserId = '' +let waitingMultiuserSafe = false +let latestSyncChat:Chat|null = null export async function joinMultiuserRoom(){ //join a room with webrtc + ConnectionIsHost.set(false) alertWait("Loading...") const peerJS = await importPeerJS(); peer = new peerJS.Peer( @@ -145,6 +271,7 @@ export async function joinMultiuserRoom(){ let open = false conn = peer.connect(roomId); + RoomIdStore.set(roomId) conn.on('open', function() { alertWait("Waiting for host to accept connection") @@ -179,6 +306,32 @@ export async function joinMultiuserRoom(){ } case 'receive-asset':{ saveImage(data.data, data.id) + break + } + case 'receive-chat':{ + const db = get(DataBase) + const selectedCharId = get(selectedCharID) + const char = structuredClone(db.characters[selectedCharId]) + char.chats[char.chatPage] = data.data + db.characters[selectedCharId] = char + latestSyncChat = data.data + setDatabase(db) + break + } + case 'request-chat-safe':{ + const rs:ResponseChatSafe = { + type: 'response-chat-safe', + data: !get(doingChat) || data.id === waitingMultiuserId, + id: data.id + } + conn.send(rs) + break + } + case 'response-chat-safe':{ + if(data.id === waitingMultiuserId){ + waitingMultiuserId = '' + waitingMultiuserSafe = data.data + } } } }); @@ -186,6 +339,7 @@ export async function joinMultiuserRoom(){ conn.on('close', function() { alertError("Connection closed") connectionOpen = false + ConnectionOpenStore.set(false) selectedCharID.set(-1) }) @@ -199,29 +353,78 @@ export async function joinMultiuserRoom(){ } } connectionOpen = true + ConnectionOpenStore.set(true) alertNormal("Connected") }); } -export function sendPeerChar(){ +export async function peerSync(){ if(!connectionOpen){ return } + await sleep(1) + const chat = get(CurrentChat) + latestSyncChat = chat if(!conn){ // host user for(const connection of connections){ connection.send({ - type: 'receive-char', - data: get(DataBase).characters[get(selectedCharID)] + type: 'receive-chat', + data: chat }); } } else{ conn.send({ - type: 'receive-char', - data: get(DataBase).characters[get(selectedCharID)] - }); + type: 'request-chat-sync', + data: chat + } as RequestSync) } +} + +export async function peerSafeCheck() { + if(!connectionOpen){ + return true + } + await sleep(500) + if(!conn){ + waitingMultiuserId = v4() + requestChatSafeQueue.set(waitingMultiuserId, { + remaining: connections.length, + safe: true, + }) + for(const connection of connections){ + const rs:RequestChatSafe = { + type: 'request-chat-safe', + id: waitingMultiuserId + } + connection.send(rs) + } + while(waitingMultiuserId !== ''){ + await sleep(100) + } + return waitingMultiuserSafe + } + else{ + waitingMultiuserId = v4() + const rs:RequestChatSafe = { + type: 'request-chat-safe', + id: waitingMultiuserId + } + conn.send(rs) + while(waitingMultiuserId !== ''){ + await sleep(100) + } + return waitingMultiuserSafe + + } +} + +export function peerRevertChat() { + if(!connectionOpen || !latestSyncChat){ + return + } + CurrentChat.set(latestSyncChat) } \ No newline at end of file diff --git a/src/ts/tokenizer.ts b/src/ts/tokenizer.ts index 7afe4fa0..d0b6633f 100644 --- a/src/ts/tokenizer.ts +++ b/src/ts/tokenizer.ts @@ -1,12 +1,13 @@ import type { Tiktoken } from "@dqbd/tiktoken"; import type { Tokenizer } from "@mlc-ai/web-tokenizers"; -import { DataBase, type character } from "./storage/database"; +import { DataBase, type groupChat, type character, type Chat } from "./storage/database"; import { get } from "svelte/store"; import type { MultiModal, OpenAIChat } from "./process"; import { supportsInlayImage } from "./process/files/image"; import { risuChatParser } from "./parser"; import { tokenizeGGUFModel } from "./process/models/local"; import { globalFetch } from "./storage/globalApi"; +import { CurrentCharacter } from "./stores"; export const tokenizerList = [ @@ -18,6 +19,7 @@ export const tokenizerList = [ ['llama3', 'Llama3'], ['novellist', 'Novellist'], ['gemma', 'Gemma'], + ['cohere', 'Cohere'], ] as const export async function encode(data:string):Promise<(number[]|Uint32Array|Int32Array)>{ @@ -38,6 +40,8 @@ export async function encode(data:string):Promise<(number[]|Uint32Array|Int32Arr return await tokenizeWebTokenizers(data, 'llama') case 'gemma': return await tokenizeWebTokenizers(data, 'gemma') + case 'cohere': + return await tokenizeWebTokenizers(data, 'cohere') default: // Add exception for gpt-4o tokenizers on reverse_proxy if(db.proxyRequestModel?.startsWith('gpt4o') || @@ -342,4 +346,57 @@ export async function strongBan(data:string, bias:{[key:number]:number}) { } localStorage.setItem('strongBan_' + data, JSON.stringify(bias)) return bias +} + +export async function getCharToken(char?:character|groupChat|null){ + let persistant = 0 + let dynamic = 0 + + if(!char){ + const c = get(CurrentCharacter) + char = c + } + if(char.type === 'group'){ + return {persistant:0, dynamic:0} + } + + const basicTokenize = async (data:string) => { + data = data.replace(/{{char}}/g, char.name).replace(//g, char.name) + return await tokenize(data) + } + + persistant += await basicTokenize(char.desc) + persistant += await basicTokenize(char.personality ?? '') + persistant += await basicTokenize(char.scenario ?? '') + for(const lore of char.globalLore){ + let cont = lore.content.split('\n').filter((line) => { + if(line.startsWith('@@')){ + return false + } + if(line === ''){ + return false + } + return true + }).join('\n') + dynamic += await basicTokenize(cont) + } + + return {persistant, dynamic} +} + +export async function getChatToken(chat:Chat) { + let persistant = 0 + + const chatTokenizer = new ChatTokenizer(0, 'name') + const chatf = chat.message.map((d) => { + return { + role: d.role === 'user' ? 'user' : 'assistant', + content: d.data, + } as OpenAIChat + }) + for(const chat of chatf){ + persistant += await chatTokenizer.tokenizeChat(chat) + } + + return persistant } \ No newline at end of file diff --git a/src/ts/translator/translator.ts b/src/ts/translator/translator.ts index 7640249b..b0b13b20 100644 --- a/src/ts/translator/translator.ts +++ b/src/ts/translator/translator.ts @@ -165,7 +165,7 @@ async function translateMain(text:string, arg:{from:string, to:string, host:stri } - const url = `https://${arg.host}/translate_a/single?client=gtx&dt=t&sl=${arg.from}&tl=${arg.to}&q=` + encodeURIComponent(text) + const url = `https://${arg.host}/translate_a/single?client=gtx&dt=t&sl=${db.translatorInputLanguage}&tl=${arg.to}&q=` + encodeURIComponent(text) @@ -239,7 +239,7 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl return html } } - if(db.translatorType === 'llm' && (!(isTauri || Capacitor.isNativePlatform()))){ + if(db.translatorType === 'llm'){ const tr = db.translator || 'en' return translateLLM(html, {to: tr}) } @@ -456,14 +456,23 @@ async function translateLLM(text:string, arg:{to:string}){ }) const db = get(DataBase) + const charIndex = get(selectedCharID) + const currentChar = db.characters[charIndex] + let translatorNote + if (currentChar.type === "character") { + translatorNote = currentChar.translatorNote ?? "" + } else { + translatorNote = "" + } + let formated:OpenAIChat[] = [] let prompt = db.translatorPrompt || `You are a translator. translate the following html or text into {{slot}}. do not output anything other than the translation.` - let parsedPrompt = parseChatML(prompt.replaceAll('{{slot}}', arg.to).replaceAll('{{solt::content}}', text)) + let parsedPrompt = parseChatML(prompt.replaceAll('{{slot}}', arg.to).replaceAll('{{solt::content}}', text).replaceAll('{{slot::tnote}}', translatorNote)) if(parsedPrompt){ formated = parsedPrompt } else{ - prompt = prompt.replaceAll('{{slot}}', arg.to) + prompt = prompt.replaceAll('{{slot}}', arg.to).replaceAll('{{slot::tnote}}', translatorNote) formated = [ { 'role': 'system', diff --git a/src/ts/update.ts b/src/ts/update.ts index ed94bd8d..85528a83 100644 --- a/src/ts/update.ts +++ b/src/ts/update.ts @@ -2,10 +2,9 @@ import { alertConfirm, alertWait } from "./alert"; import { language } from "../lang"; import { Capacitor } from "@capacitor/core"; import { - checkUpdate, - installUpdate, -} from '@tauri-apps/api/updater' -import { relaunch } from '@tauri-apps/api/process' + check, +} from '@tauri-apps/plugin-updater' +import { relaunch } from '@tauri-apps/plugin-process' export async function checkRisuUpdate(){ @@ -14,12 +13,12 @@ export async function checkRisuUpdate(){ } try { - const checked = await checkUpdate() - if(checked.shouldUpdate){ + const checked = await check() + if(checked){ const conf = await alertConfirm(language.newVersion) if(conf){ - alertWait(`Updating to ${checked.manifest.version}...`) - await installUpdate() + alertWait(`Updating to ${checked.version}...`) + await checked.downloadAndInstall() await relaunch() } } diff --git a/src/ts/util.ts b/src/ts/util.ts index 0e5975a3..e98eba82 100644 --- a/src/ts/util.ts +++ b/src/ts/util.ts @@ -2,12 +2,13 @@ import { get, writable, type Writable } from "svelte/store" import type { Database, Message } from "./storage/database" import { DataBase } from "./storage/database" import { selectedCharID } from "./stores" -import {open} from '@tauri-apps/api/dialog' -import { readBinaryFile } from "@tauri-apps/api/fs" +import {open} from '@tauri-apps/plugin-dialog' +import { readFile } from "@tauri-apps/plugin-fs" import { basename } from "@tauri-apps/api/path" import { createBlankChar, getCharImage } from "./characters" -import { appWindow } from '@tauri-apps/api/window'; +import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'; import { isTauri } from "./storage/globalApi" +const appWindow = isTauri ? getCurrentWebviewWindow() : null export const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1 @@ -64,7 +65,7 @@ export async function selectSingleFile(ext:string[]){ } else if (selected === null) { return null } else { - return {name: await basename(selected),data:await readBinaryFile(selected)} + return {name: await basename(selected),data:await readFile(selected)} } } @@ -88,13 +89,13 @@ export async function selectMultipleFile(ext:string[]){ if (Array.isArray(selected)) { let arr:{name:string, data:Uint8Array}[] = [] for(const file of selected){ - arr.push({name: await basename(file),data:await readBinaryFile(file)}) + arr.push({name: await basename(file),data:await readFile(file)}) } return arr } else if (selected === null) { return null } else { - return [{name: await basename(selected),data:await readBinaryFile(selected)}] + return [{name: await basename(selected),data:await readFile(selected)}] } } @@ -471,13 +472,17 @@ export function parseMultilangString(data:string){ } export const toLangName = (code:string) => { - switch(code){ - case 'xx':{ //Special case for unknown language - return 'Unknown Language' - } - default:{ - return new Intl.DisplayNames([code, 'en'], {type: 'language'}).of(code) - } + try { + switch(code){ + case 'xx':{ //Special case for unknown language + return 'Unknown Language' + } + default:{ + return new Intl.DisplayNames([code, 'en'], {type: 'language'}).of(code) + } + } + } catch (error) { + return code } } diff --git a/tsconfig.json b/tsconfig.json index ca06bddc..80c16c31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "extends": "@tsconfig/svelte/tsconfig.json", "compilerOptions": { - "target": "ESNext", + "target": "ES2022", "useDefineForClassFields": true, - "module": "ESNext", + "module": "ES2022", "resolveJsonModule": true, "baseUrl": ".", /** diff --git a/version.json b/version.json index 9c14a55a..a3afc201 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{"version":"124.2.2"} \ No newline at end of file +{"version":"136.0.1"} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 360bd091..bde467ed 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -32,10 +32,7 @@ export default defineConfig({ host: '0.0.0.0', // listen on all addresses port: 5174, strictPort: true, - hmr: { - protocol: 'ws', - port: 5184, - }, + hmr: false, }, // to make use of `TAURI_DEBUG` and other env variables // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand