diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 53080db..8d6f610 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -33,9 +33,7 @@ jobs: - run: npm run build - name: Build and lint aBridge Android run: apps/android/gradlew -p apps/android --no-daemon assembleDebug assembleRelease lintDebug testDebugUnitTest - - name: Build and lint AI Home Android - run: apps/controller/gradlew -p apps/controller --no-daemon assembleDebug assembleRelease lintDebug testDebugUnitTest - - name: "Verify signed APK sizes (aBridge: 300,000 B; AI Home: 2,000,000 B)" + - name: "Verify signed APK size (300,000 B)" run: | work=$(mktemp -d) trap 'rm -rf "$work"' EXIT @@ -46,8 +44,7 @@ jobs: export ANDROID_KEYSTORE_BASE64="$(openssl base64 -A -in "$work/check.keystore")" export ANDROID_KEYSTORE_PASSWORD=sizecheck ANDROID_KEY_ALIAS=android ANDROID_KEY_PASSWORD=sizecheck export ANDROID_APK_PYTHON="$work/python/bin/python" - bash tools/sign-android-release.sh abridge - bash tools/sign-android-release.sh aihome + bash tools/sign-android-release.sh - name: Upload installable Debug APK uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: @@ -55,10 +52,3 @@ jobs: path: apps/android/build/outputs/apk/debug/*.apk if-no-files-found: error retention-days: 14 - - name: Upload installable AI Home Debug APK - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - with: - name: aihome-android-debug - path: apps/controller/build/outputs/apk/debug/*.apk - if-no-files-found: error - retention-days: 14 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3232cef..c5e96ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,12 +86,10 @@ jobs: run: | npm --prefix apps/android/ui ci --legacy-peer-deps --no-audit --no-fund apps/android/gradlew -p apps/android --no-daemon assembleRelease - apps/controller/gradlew -p apps/controller --no-daemon assembleRelease python3 -m venv "$RUNNER_TEMP/android-apk-build" "$RUNNER_TEMP/android-apk-build/bin/python" -m pip install -r tools/android-apk-requirements.txt export ANDROID_APK_PYTHON="$RUNNER_TEMP/android-apk-build/bin/python" - bash tools/sign-android-release.sh abridge - bash tools/sign-android-release.sh aihome + bash tools/sign-android-release.sh - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 if: runner.os == 'Linux' with: @@ -102,7 +100,6 @@ jobs: dist/releases/abridge-client-browser-*.tar.gz* dist/releases/install-browser-client.sh* dist/releases/aBridge-*-android.apk - dist/releases/AIHome-*-android.apk if-no-files-found: error retention-days: 14 - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 diff --git a/apps/controller/.gitignore b/apps/controller/.gitignore deleted file mode 100644 index 8eba115..0000000 --- a/apps/controller/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.gradle/ -.kotlin/ -build/ -local.properties diff --git a/apps/controller/README.md b/apps/controller/README.md deleted file mode 100644 index 01ad9e4..0000000 --- a/apps/controller/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# AI 家 / AI Home - -独立 Android 控制端,包名 `com.aihome.app`。它连接 aBridge Server 的 `/controller/` 页面,提供聊天草稿、任务确认和任务状态;接收任务的 aBridge Android 客户端需要单独安装和授权。启用 AI 家 Web 后,Server 首页进入 `/admin`。管理员可在「设备 → 添加 Android 设备」为指定账户生成接收端 Device Key。 - -## 构建与安装 - -原生壳需要 JDK 17、Android SDK 36;前端需要 Node.js 与 npm。分别安装控制端 UI 的依赖并构建,再构建 APK: - -```sh -npm --prefix apps/controller/ui ci -npm run controller:web:build -cd apps/controller -./gradlew assembleDebug -adb install -r build/outputs/apk/debug/AIHome-debug.apk -``` - -APK 压缩 DEX 字节码,由 Android 在安装时解压。正式 APK 重新压缩、对齐并签名后,上限为 2,000,000 字节(2 MB,十进制);CI 和发布流程通过 `bash tools/sign-android-release.sh aihome` 检查。aBridge 接收端仍使用独立的 300,000 字节上限。 - -APK 不包含前端资源。前端由 Server 同源托管,更新后需重新构建并部署 `ui/dist`。安装控制端不会安装或替换接收任务的 aBridge 客户端。 - -## Server 与工作进程 - -先按仓库部署说明配置并启动 Server。将 `ABRIDGE_CONTROLLER_WEB_ROOT` 设置为 `apps/controller/ui/dist` 的绝对路径,重启 Server 后访问 `/controller/`;管理台资源继续使用已有配置。嵌入式调用 `createServer` 时使用 `controllerStaticRoot`。控制端不保存 Worker Key 或模型 Key。 - -任务执行还需要独立 Go 工作进程,设置 `ABRIDGE_TASK_SERVER_URL` 为 Server 基址,并在 Server 和工作进程配置相同的 `ABRIDGE_TASK_KEY`(至少 24 字符);模型端点与凭据见 [Agent 说明](../agent/README.md)。目标 Android 客户端必须在线、允许屏幕及输入,并支持任务会话清理确认。工作进程未运行时,已确认任务留在 Server 队列中。 - -首次打开 AI 家时输入 Server Origin,例如 `https://bridge.example.com`,然后使用 Server 账户登录。本机调试可显式打开 HTTP 开关,模拟器连接宿主机使用 `http://10.0.2.2:端口`。公网部署使用 HTTPS。语音输入依赖 Android 可用的系统语音服务,识别结果先填入输入框,任务仍需确认后执行。 - -## 开发检查 - -```sh -npm run controller:web:build -(cd apps/controller && ./gradlew testDebugUnitTest lintDebug) -node --import tsx --test apps/server/tests/controller-chat.test.ts -npm run agent:check -npm run check -``` - -构建及单元测试不能替代真实设备上的登录、语音识别和任务执行验收。 diff --git a/apps/controller/build.gradle b/apps/controller/build.gradle deleted file mode 100644 index 084a110..0000000 --- a/apps/controller/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'com.android.application' version '9.2.1' -} - -def upstream = new groovy.json.JsonSlurper().parse(file('../../package.json')).version -def parts = upstream.tokenize('.').take(3).collect { it.replaceAll(/[^0-9].*$/, '').toInteger() } -android { - namespace 'com.aihome.app' - compileSdk 36 - defaultConfig { - applicationId 'com.aihome.app' - minSdk 30 - targetSdk 36 - versionName upstream - versionCode parts[0] * 1000000 + parts[1] * 1000 + parts[2] - } - packaging { - // Compress DEX in the download; Android extracts it during installation. - dex.useLegacyPackaging = true - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } -} -dependencies { - implementation 'androidx.webkit:webkit:1.14.0' - testImplementation 'junit:junit:4.13.2' -} diff --git a/apps/controller/gradle.properties b/apps/controller/gradle.properties deleted file mode 100644 index 5bac8ac..0000000 --- a/apps/controller/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -android.useAndroidX=true diff --git a/apps/controller/gradle/wrapper/gradle-wrapper.jar b/apps/controller/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 8bdaf60..0000000 Binary files a/apps/controller/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/apps/controller/gradle/wrapper/gradle-wrapper.properties b/apps/controller/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index c61a118..0000000 --- a/apps/controller/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/apps/controller/gradlew b/apps/controller/gradlew deleted file mode 100755 index 739907d..0000000 --- a/apps/controller/gradlew +++ /dev/null @@ -1,248 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/apps/controller/settings.gradle b/apps/controller/settings.gradle deleted file mode 100644 index a8b28a1..0000000 --- a/apps/controller/settings.gradle +++ /dev/null @@ -1,8 +0,0 @@ -pluginManagement { - repositories { google(); mavenCentral(); gradlePluginPortal() } -} -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { google(); mavenCentral() } -} -rootProject.name = 'AIHome' diff --git a/apps/controller/src/main/AndroidManifest.xml b/apps/controller/src/main/AndroidManifest.xml deleted file mode 100644 index 53dd8a5..0000000 --- a/apps/controller/src/main/AndroidManifest.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff --git a/apps/controller/src/main/java/com/aihome/app/MainActivity.kt b/apps/controller/src/main/java/com/aihome/app/MainActivity.kt deleted file mode 100644 index b53e678..0000000 --- a/apps/controller/src/main/java/com/aihome/app/MainActivity.kt +++ /dev/null @@ -1,223 +0,0 @@ -package com.aihome.app - -import android.app.Activity -import android.app.AlertDialog -import android.content.ActivityNotFoundException -import android.content.Intent -import android.graphics.Color -import android.os.Bundle -import android.net.Uri -import android.webkit.ValueCallback -import android.webkit.WebChromeClient -import android.speech.RecognizerIntent -import android.webkit.CookieManager -import android.webkit.WebResourceRequest -import android.webkit.WebResourceResponse -import android.webkit.WebSettings -import android.webkit.WebStorage -import android.webkit.WebView -import android.webkit.WebViewClient -import android.widget.Button -import android.widget.CheckBox -import android.widget.EditText -import android.widget.LinearLayout -import android.widget.TextView -import androidx.webkit.WebViewCompat -import androidx.webkit.WebViewFeature -import org.json.JSONObject -import java.io.ByteArrayInputStream - -/** Independent controller: no receiver service, device credentials or accessibility privileges. */ -class MainActivity : Activity() { - private lateinit var web: WebView - private var policy: ServerPolicy? = null - private var voiceDocument: String? = null - private var navigationGeneration = 0 - private var voiceGeneration = -1 - private var voicePending = false - private var fileResult: ValueCallback>? = null - private var fileGeneration = -1 - private val preferences by lazy { getSharedPreferences("controller-settings", MODE_PRIVATE) } - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - val root = LinearLayout(this).apply { orientation = LinearLayout.VERTICAL; setBackgroundColor(Color.WHITE) } - root.setOnApplyWindowInsetsListener { view, insets -> - val bars = insets.getInsets(android.view.WindowInsets.Type.systemBars()) - view.setPadding(bars.left, bars.top, bars.right, bars.bottom) - insets - } - val header = LinearLayout(this).apply { gravity = android.view.Gravity.CENTER_VERTICAL; setPadding(20, 4, 12, 4) } - header.addView(TextView(this).apply { text = getString(R.string.app_name); textSize = 18f }, LinearLayout.LayoutParams(0, 48.dp, 1f)) - header.addView(Button(this).apply { text = "服务器"; setOnClickListener { settings() } }) - root.addView(header) - web = WebView(this) - root.addView(web, LinearLayout.LayoutParams(-1, 0, 1f)) - setContentView(root) - web.settings.apply { - javaScriptEnabled = true - domStorageEnabled = true - allowFileAccess = false - allowContentAccess = false - mixedContentMode = WebSettings.MIXED_CONTENT_NEVER_ALLOW - setSupportMultipleWindows(false) - javaScriptCanOpenWindowsAutomatically = false - } - CookieManager.getInstance().setAcceptThirdPartyCookies(web, false) - web.webViewClient = object : WebViewClient() { - override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean = - !request.isForMainFrame || policy?.trustedDocument(request.url.toString()) != true - - override fun shouldInterceptRequest(view: WebView, request: WebResourceRequest): WebResourceResponse? { - val current = policy - if (current?.sameOrigin(request.url.toString()) != true || - (request.isForMainFrame && !current.trustedDocument(request.url.toString()))) { - return WebResourceResponse("text/plain", "UTF-8", 403, "Blocked", emptyMap(), ByteArrayInputStream(ByteArray(0))) - } - return null - } - override fun onPageStarted(view: WebView, url: String, favicon: android.graphics.Bitmap?) { - navigationGeneration++ - voiceDocument = null - if (policy?.trustedDocument(url) != true) view.stopLoading() - } - override fun onPageFinished(view: WebView, url: String) { - if (policy?.trustedDocument(url) == true && WebViewFeature.isFeatureSupported(WebViewFeature.WEB_MESSAGE_LISTENER)) { - view.evaluateJavascript(""" - window.aBridgeController = Object.freeze({ - startVoiceInput: () => window.controllerVoice.postMessage('start'), - cancelVoiceInput: () => window.controllerVoice.postMessage('cancel') - }); - window.dispatchEvent(new Event('abridge:native-ready')); - """.trimIndent(), null) - } - } - override fun onReceivedError(view: WebView, request: WebResourceRequest, error: android.webkit.WebResourceError) { - if (request.isForMainFrame) android.widget.Toast.makeText(this@MainActivity, "无法连接服务器,请检查服务器地址与网络", android.widget.Toast.LENGTH_LONG).show() - } - } - web.webChromeClient = object : WebChromeClient() { - override fun onShowFileChooser(view: WebView, callback: ValueCallback>, params: FileChooserParams): Boolean { - if (policy?.trustedDocument(view.url ?: "") != true || params.mode != FileChooserParams.MODE_OPEN) return false - fileResult?.onReceiveValue(null) - fileResult = callback - fileGeneration = navigationGeneration - try { - startActivityForResult(Intent(Intent.ACTION_OPEN_DOCUMENT).apply { - addCategory(Intent.CATEGORY_OPENABLE) - type = "image/*" - }, IMAGE_REQUEST) - } catch (_: ActivityNotFoundException) { fileResult = null; callback.onReceiveValue(null) } - return true - } - } - val address = preferences.getString("origin", null) - if (address == null) settings() else connect(address, preferences.getBoolean("local-http", false), false) - } - - private fun connect(address: String, allowLocal: Boolean, clearSession: Boolean) { - val next = ServerPolicy(address, allowLocal) - navigationGeneration++ - voiceDocument = null - policy = next - web.stopLoading() - if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_MESSAGE_LISTENER)) { - WebViewCompat.removeWebMessageListener(web, "controllerVoice") - WebViewCompat.addWebMessageListener(web, "controllerVoice", setOf(next.origin)) { _, message, sourceOrigin, isMainFrame, _ -> - if (isMainFrame && policy === next && next.sameOrigin(sourceOrigin.toString()) && next.trustedDocument(web.url ?: "")) { - when (message.data) { - "start" -> startVoice() - "cancel" -> { voiceDocument = null; if (voicePending) finishActivity(VOICE_REQUEST); emit("state", JSONObject().put("state", "idle")) } - } - } - } - } - preferences.edit().putString("origin", next.origin).putBoolean("local-http", allowLocal).apply() - if (clearSession) { - web.clearHistory() - web.clearCache(true) - WebStorage.getInstance().deleteAllData() - CookieManager.getInstance().removeAllCookies { web.loadUrl(next.controllerUrl) } - } else web.loadUrl(next.controllerUrl) - } - - private fun settings() { - val panel = LinearLayout(this).apply { orientation = LinearLayout.VERTICAL; setPadding(24.dp, 8.dp, 24.dp, 4.dp) } - val address = EditText(this).apply { - hint = "https://bridge.example.com" - setSingleLine(true) - inputType = android.text.InputType.TYPE_CLASS_TEXT or android.text.InputType.TYPE_TEXT_VARIATION_URI - setText(preferences.getString("origin", "")) - } - val local = CheckBox(this).apply { text = "允许本机 / 模拟器调试 HTTP"; isChecked = preferences.getBoolean("local-http", false) } - val error = TextView(this).apply { setTextColor(Color.RED) } - panel.addView(address); panel.addView(local); panel.addView(error) - val dialog = AlertDialog.Builder(this).setTitle("连接控制端服务器").setView(panel) - .setPositiveButton("连接", null).setNegativeButton("取消", null).create() - dialog.setOnShowListener { - dialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { - try { - val next = ServerPolicy(address.text.toString(), local.isChecked) - connect(next.origin, local.isChecked, next.origin != policy?.origin) - dialog.dismiss() - } catch (exception: Exception) { error.text = exception.message ?: "服务器地址无效" } - } - } - dialog.show() - } - - private fun startVoice() { - if (voicePending) return - voiceDocument = web.url - voiceGeneration = navigationGeneration - val intent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply { - putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM) - putExtra(RecognizerIntent.EXTRA_PROMPT, "说出任务内容") - putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1) - } - try { - startActivityForResult(intent, VOICE_REQUEST) - voicePending = true - emit("state", JSONObject().put("state", "listening")) - } catch (_: ActivityNotFoundException) { - voiceDocument = null - emit("error", JSONObject().put("message", "此设备没有语音识别服务,请使用键盘输入")) - } catch (_: SecurityException) { - voiceDocument = null - emit("error", JSONObject().put("message", "系统无法启动语音输入,请检查语音服务权限")) - } - } - - @Deprecated("Activity result bridge for platform speech UI") - override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { - super.onActivityResult(requestCode, resultCode, data) - if (requestCode == IMAGE_REQUEST) { - val callback = fileResult - fileResult = null - val uri = data?.data - val allowed = resultCode == RESULT_OK && fileGeneration == navigationGeneration && - policy?.trustedDocument(web.url ?: "") == true && uri?.scheme == "content" - callback?.onReceiveValue(if (allowed && uri != null) arrayOf(uri) else null) - return - } - if (requestCode != VOICE_REQUEST) return - voicePending = false - val original = voiceDocument - voiceDocument = null - if (original == null || voiceGeneration != navigationGeneration || original != web.url) return - if (resultCode == RESULT_OK) { - val text = data?.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS)?.firstOrNull()?.trim() - if (!text.isNullOrEmpty()) emit("result", JSONObject().put("text", text)) - else emit("error", JSONObject().put("message", "未识别到文字,请重试")) - } - emit("state", JSONObject().put("state", "idle")) - } - - private fun emit(event: String, detail: JSONObject) { - if (policy?.trustedDocument(web.url ?: "") != true) return - web.evaluateJavascript("window.dispatchEvent(new CustomEvent(${JSONObject.quote("abridge:voice-$event")},{detail:$detail}));", null) - } - override fun onDestroy() { voiceDocument = null; fileResult?.onReceiveValue(null); fileResult = null; web.destroy(); super.onDestroy() } - private val Int.dp get() = (this * resources.displayMetrics.density).toInt() - companion object { private const val VOICE_REQUEST = 1601; private const val IMAGE_REQUEST = 1602 } -} diff --git a/apps/controller/src/main/java/com/aihome/app/ServerPolicy.kt b/apps/controller/src/main/java/com/aihome/app/ServerPolicy.kt deleted file mode 100644 index f855ff0..0000000 --- a/apps/controller/src/main/java/com/aihome/app/ServerPolicy.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.aihome.app - -import java.net.URI -import java.util.Locale - -/** Exact server origin, with a separate explicit local-development HTTP opt-in. */ -class ServerPolicy(address: String, allowLocalHttp: Boolean) { - val origin: String - init { - val uri = URI(address.trim()) - val scheme = uri.scheme?.lowercase(Locale.ROOT) - val host = uri.host?.lowercase(Locale.ROOT) - require(host != null && uri.rawUserInfo == null && uri.rawQuery == null && uri.rawFragment == null && - (uri.rawPath.isNullOrEmpty() || uri.rawPath == "/") && - (uri.port == -1 || uri.port in 1..65535)) { "请输入完整的服务器 Origin(不含路径、凭据或查询参数)" } - require(scheme == "https" || (scheme == "http" && allowLocalHttp && - host in setOf("localhost", "127.0.0.1", "[::1]", "10.0.2.2"))) { - "服务器必须使用 HTTPS;本机调试 HTTP 需单独启用" - } - val port = if (uri.port == -1 || (scheme == "https" && uri.port == 443) || (scheme == "http" && uri.port == 80)) "" else ":${uri.port}" - origin = "$scheme://$host$port" - } - val controllerUrl get() = "$origin/controller/" - fun sameOrigin(url: String): Boolean = runCatching { - val uri = URI(url) - uri.rawUserInfo == null && ServerPolicy(URI(uri.scheme, null, uri.host, uri.port, null, null, null).toString(), true).origin == origin - }.getOrDefault(false) - fun trustedDocument(url: String): Boolean = runCatching { - sameOrigin(url) && URI(url).rawPath in setOf("/controller", "/controller/") - }.getOrDefault(false) -} diff --git a/apps/controller/src/main/res/drawable/ic_launcher.xml b/apps/controller/src/main/res/drawable/ic_launcher.xml deleted file mode 100644 index fdab561..0000000 --- a/apps/controller/src/main/res/drawable/ic_launcher.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/apps/controller/src/main/res/values-zh/strings.xml b/apps/controller/src/main/res/values-zh/strings.xml deleted file mode 100644 index e670e95..0000000 --- a/apps/controller/src/main/res/values-zh/strings.xml +++ /dev/null @@ -1 +0,0 @@ -AI 家 diff --git a/apps/controller/src/main/res/values/strings.xml b/apps/controller/src/main/res/values/strings.xml deleted file mode 100644 index 9aab447..0000000 --- a/apps/controller/src/main/res/values/strings.xml +++ /dev/null @@ -1 +0,0 @@ -AI Home diff --git a/apps/controller/src/main/res/values/styles.xml b/apps/controller/src/main/res/values/styles.xml deleted file mode 100644 index d4d9782..0000000 --- a/apps/controller/src/main/res/values/styles.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/apps/controller/src/main/res/xml/data_extraction_rules.xml b/apps/controller/src/main/res/xml/data_extraction_rules.xml deleted file mode 100644 index 5f81dd4..0000000 --- a/apps/controller/src/main/res/xml/data_extraction_rules.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/apps/controller/src/main/res/xml/network_security_config.xml b/apps/controller/src/main/res/xml/network_security_config.xml deleted file mode 100644 index a0a75d3..0000000 --- a/apps/controller/src/main/res/xml/network_security_config.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - localhost - 127.0.0.1 - 10.0.2.2 - ::1 - - diff --git a/apps/controller/src/test/java/com/aihome/app/ServerPolicyTest.kt b/apps/controller/src/test/java/com/aihome/app/ServerPolicyTest.kt deleted file mode 100644 index f79978e..0000000 --- a/apps/controller/src/test/java/com/aihome/app/ServerPolicyTest.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.aihome.app - -import org.junit.Assert.* -import org.junit.Test - -class ServerPolicyTest { - @Test fun productionOriginAndExactController() { - val policy = ServerPolicy("https://bridge.example:443/", false) - assertEquals("https://bridge.example", policy.origin) - assertTrue(policy.trustedDocument("https://bridge.example/controller/")) - assertTrue(policy.trustedDocument("https://bridge.example/controller?task=1")) - listOf("https://evil.example/controller/", "https://bridge.example/", "https://bridge.example/admin", "https://bridge.example/controller/evil", "https://bridge.example/%63ontroller/", "https://bridge.example:444/controller/", "https://user@bridge.example/controller/").forEach { - assertFalse(it, policy.trustedDocument(it)) - } - } - @Test fun rejectUnsafeConfiguration() { - listOf("http://bridge.example", "http://127.0.0.1:8765", "https://user:pass@bridge.example", "https://bridge.example/admin", "https://bridge.example?secret=x", "file:///controller/", "https://bridge.example:0").forEach { - assertThrows(it, IllegalArgumentException::class.java) { ServerPolicy(it, false) } - } - assertThrows(IllegalArgumentException::class.java) { ServerPolicy("http://192.168.1.2:8765", true) } - } - @Test fun explicitEmulatorOptInAndResourceOrigins() { - val policy = ServerPolicy("http://10.0.2.2:8765", true) - assertTrue(policy.sameOrigin("http://10.0.2.2:8765/api/tasks")) - assertFalse(policy.trustedDocument("http://10.0.2.2:8765/api/tasks")) - assertFalse(policy.sameOrigin("http://10.0.2.2:8766/api/tasks")) - assertFalse(policy.sameOrigin("javascript:alert(1)")) - } -} diff --git a/apps/controller/ui/index.html b/apps/controller/ui/index.html deleted file mode 100644 index cad2b40..0000000 --- a/apps/controller/ui/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - AI 家 · AI Home - - -
- - - diff --git a/apps/controller/ui/package-lock.json b/apps/controller/ui/package-lock.json deleted file mode 100644 index a4cc8af..0000000 --- a/apps/controller/ui/package-lock.json +++ /dev/null @@ -1,1710 +0,0 @@ -{ - "name": "@abridge/controller-ui", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@abridge/controller-ui", - "dependencies": { - "@abridge/protocol": "file:../../../packages/protocol", - "@chatscope/chat-ui-kit-react": "2.1.1", - "@chatscope/chat-ui-kit-styles": "1.4.0", - "jsqr": "^1.4.0", - "lucide-react": "1.73.0", - "qrcode": "^1.5.4", - "react": "18.3.1", - "react-dom": "18.3.1" - }, - "devDependencies": { - "@types/qrcode": "^1.5.6", - "@types/react": "18.3.28", - "@types/react-dom": "18.3.7", - "typescript": "5.9.3", - "vite": "7.3.8" - } - }, - "../../../packages/protocol": { - "name": "@abridge/protocol", - "license": "Apache-2.0", - "dependencies": { - "zod": "4.6.7" - } - }, - "node_modules/@abridge/protocol": { - "resolved": "../../../packages/protocol", - "link": true - }, - "node_modules/@chatscope/chat-ui-kit-react": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@chatscope/chat-ui-kit-react/-/chat-ui-kit-react-2.1.1.tgz", - "integrity": "sha512-rCtE9abdmAbBDkAAUYBC1TDTBMZHquqFIZhADptAfHcJ8z8W3XH/z/ZuwBSJXtzi6h1mwCNc3tBmm1A2NLGhNg==", - "license": "MIT", - "dependencies": { - "@chatscope/chat-ui-kit-styles": "^1.2.0", - "@fortawesome/fontawesome-free": "^6.5.2", - "@fortawesome/fontawesome-svg-core": "^6.5.2", - "@fortawesome/free-solid-svg-icons": "^6.5.2", - "@fortawesome/react-fontawesome": "^0.2.2", - "classnames": "^2.2.6", - "prop-types": "^15.7.2" - }, - "peerDependencies": { - "prop-types": "^15.7.2", - "react": "^16.12.0 || ^17.0.0 || ^18.2.0 || ^19.0.0", - "react-dom": "^16.12.0 || ^17.0.0 || ^18.2.0 || ^19.0.0" - } - }, - "node_modules/@chatscope/chat-ui-kit-styles": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@chatscope/chat-ui-kit-styles/-/chat-ui-kit-styles-1.4.0.tgz", - "integrity": "sha512-016mBJD3DESw7Nh+lkKcPd22xG92ghA0VpIXIbjQtmXhC7Ve6wRazTy8z1Ahut+Tbv179+JxrftuMngsj/yV8Q==", - "license": "MIT" - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", - "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", - "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", - "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", - "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", - "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", - "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", - "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", - "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", - "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", - "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", - "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", - "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", - "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", - "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", - "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", - "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", - "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", - "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", - "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", - "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", - "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", - "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", - "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", - "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", - "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", - "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", - "integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/@fortawesome/fontawesome-free": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz", - "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==", - "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", - "engines": { - "node": ">=6" - } - }, - "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz", - "integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==", - "license": "MIT", - "dependencies": { - "@fortawesome/fontawesome-common-types": "6.7.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.2.tgz", - "integrity": "sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA==", - "license": "(CC-BY-4.0 AND MIT)", - "dependencies": { - "@fortawesome/fontawesome-common-types": "6.7.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@fortawesome/react-fontawesome": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.6.tgz", - "integrity": "sha512-mtBFIi1UsYQo7rYonYFkjgYKGoL8T+fEH6NGUpvuqtY3ytMsAoDaPo5rk25KuMtKDipY4bGYM/CkmCHA1N3FUg==", - "deprecated": "v0.2.x is no longer supported. Unless you are still using FontAwesome 5, please update to v3.1.1 or greater.", - "license": "MIT", - "dependencies": { - "prop-types": "^15.8.1" - }, - "peerDependencies": { - "@fortawesome/fontawesome-svg-core": "~1 || ~6 || ~7", - "react": "^16.3 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.68.8.tgz", - "integrity": "sha512-7l9FdeCGjhmMTVePgndK4t9u5tLR+VuTTMoyc0PscqZDdYjS07ZsQ0vQYsWsODu/ZZYPG7WVJwbUZ77n1hVT+w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.68.8.tgz", - "integrity": "sha512-kXkkIiJujBjArHwEToz99BQqIqibn4xdV6SjsoaxuZzvLUCVEzoHQ1Lp62m7xOhpLRpWpCtxL2ZUy/ADKuz9/g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-x64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.68.8.tgz", - "integrity": "sha512-KYoBygnHs3zUOLR0z7SaqhMnUrSF9pbuTOJT/uHK3PrgCXdv/xaMubZD8jCpg6NTo46deasLgZRq38xFTyu8uw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.68.8.tgz", - "integrity": "sha512-YmBUNjgm5bsjOByO+H1TFbuGZe+ZnHcYtPXYj9+L1cwTu/BG8zjuUzO2PH9KwS85P0UH+WJDSb+mQ2hqjp5uBQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.68.8.tgz", - "integrity": "sha512-XMX5ybuOmkwiM13KJtsBxakZ69pyaR9thRYU2fMejhaB0VuzLMIkIc+9TBsu2rv34eEf6XaSMOaLOyEgHGWHTQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.68.8.tgz", - "integrity": "sha512-WuBXScWJDaqPJKwVrotUe1sM9DHWMN937C23RClt0MVHVt7A1rBy285ZfZTLccPEVMxmGJMt2jvdHMOI33lrKA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.68.8.tgz", - "integrity": "sha512-kegwGqP3rMenEMaKo8OzMBb5WvLW2h2jrQ3iKuYptTTF8C/yuxz+hinjBPrtYuIPLJDwxHc/hv2e4u5pmrqo9A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.68.8.tgz", - "integrity": "sha512-Qct0oLM1zGNbvqs1udQnuchg+Q9uHbkMcQqCfs3M7foNn7HvEkUypfFn9o5fklimUI5OF3A2nMknd4/vrEyeVg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.68.8.tgz", - "integrity": "sha512-xTH5vD+lW/5MU3kL/Op8RSSG/O9fxUQZuJcSBmmBeYem9uXYvCq6PDHx/oDSNeyLD/p4pGujG2PVI0R8MjAhSw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.68.8.tgz", - "integrity": "sha512-lPPStmynSHvwWpSrAsuemPFB+EWFObXjwz44EK4Hph47U6SBAk1Kehq5MkI7i8EYVjrXddaAV7YkJH8mX8QSZQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.68.8.tgz", - "integrity": "sha512-kZkvIYAihM6l6M+giSUHayDDf/JL+TYR5bYWiAX7/jUFWvMkMmysA4GV2F0HOsXQNEyctW3x1xLjww1GqW7Q1w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.68.8.tgz", - "integrity": "sha512-XZKLEIY977OJr6zUtK6nlQcLXme34c8HqVp3+WmKQxKVN6Nj+b9qE3ZHWIDHXznHJsGl2AsaMOgB0GL0fkZGUg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.68.8.tgz", - "integrity": "sha512-+sN+Fj6F9suk8SkL6boIfXDmj9iJwSKPCTeCy8/pfTOHuzNX+duhTb9uyj6154oVK8Odl5zgL4DXRZzXjsRKcw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.68.8.tgz", - "integrity": "sha512-EBCu3uDFaGwSodUl+XR8yubvVFUkSo6QK9YAIOV1vljqntzTF2/mXLM6utgLaSGf/8oM+qEe8Ai0Jd4+tyMoIQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.68.8.tgz", - "integrity": "sha512-hRC0jWdsLBckCijx2wiUfk7zW1SqEW47yMsCNoDGmQfoqq0AjW+9UYZqxg3LTmG76PyHNdNGBSuspB3CqrhGIA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.68.8.tgz", - "integrity": "sha512-OZKrTRWyGnLITUTipbeXDdtb2dxQPyFk/Fbw9qER8pIvd2Ja9hHELkY0Fv5p9yYYkimqtzVhApKKXGv0cWGQGw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.68.8.tgz", - "integrity": "sha512-HmhSRSQ+dOeOntPfmYux4rCpOQLtsGbcGLQu4nm8ig3tuVqe/bKfDHorg36LKAqYq4X/nwFr79ImtaFHHsn4ug==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.68.8.tgz", - "integrity": "sha512-wk1Ci1hsMREaBELoKPSnzRAh1oUULI+8kfb2F5vVmTD2IcfR9AKMskCusizZhIAvojOtPZihPj4OdKy6ifZwhQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.68.8.tgz", - "integrity": "sha512-mDufoUJ6fnKZnCyjV3sGEDvXQQkM6j1UmINHheGX4Emau3TZWJzX3sCVmbzkNB+W2G84BiFQdDCcF09lv0i0VA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.68.8.tgz", - "integrity": "sha512-7EGVL9rYRYQZe3UC8JQzfBN9rxk484Rfs4u/yGWumTYKUdJt6tmdP+0Y3qHvAvzJCQ+JQM5rSqZbVyrJARlGpA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.68.8.tgz", - "integrity": "sha512-Umklz+QSGwKWQVlVrsMJrwFx1oNRYHgrxSGiZM8pJCMpzWnMDMinDhPILf0BvRXfA1QOArsDcs+AE7Jd6dQxvA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.68.8.tgz", - "integrity": "sha512-BlRp6uzQDK5rczAdaXQ8dlSIRFRlkDRBqpb8GGtv8iwZxQdOjoigdFU5t5dcxpnpU0caMoT9mH27MyAl4dWwKw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.68.8.tgz", - "integrity": "sha512-Sc8Mkf/fVfcV0hBJNDRIM82BjS4kJn2Of0jP8dgQ+TodquxtCZ/5D6FgSsY3uN5IBmNi8Zrb/OHd60IEYKaw+Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.68.8.tgz", - "integrity": "sha512-XPTFXclN+I+Cfu3ONWDsw+uvgSZjTJa1B2u2EvtdKlSdgNU6mrOZdgeaMkvN+2T2KPTEXn6fnRY8IODlRg3/Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.68.8.tgz", - "integrity": "sha512-63dWiHgvpWcienfdr465lT3SIn4u3535vbDfaLKhSn0F2KJ06bbcUsewDGJZUPZCbJ67qESrPDhb85UnWdb5ew==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.68.8.tgz", - "integrity": "sha512-/W1LBsMeQAdiCuH3Z2gkRspl3mlxL+butknhq4vXjmxO45vuT08BqhehxDoE4YS+m6s9lhpq6M9/PjTEAg8PYw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/estree": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.11.tgz", - "integrity": "sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "26.6.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.10.tgz", - "integrity": "sha512-WJuPHoGB8WNQuTksNF7SOQpnH02PXeDYz4iueWbBT6/hTWnShY5F3T/hoJA3fY9+uYReDZ7pyTKKx83jQa7aGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~8.9.0" - } - }, - "node_modules/@types/prop-types": { - "version": "15.7.15", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", - "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/@types/qrcode": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz", - "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/react": { - "version": "18.3.28", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", - "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.3.7", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", - "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^18.0.0" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/classnames": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", - "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", - "license": "MIT" - }, - "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/csstype": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", - "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dijkstrajs": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", - "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", - "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.2", - "@esbuild/android-arm": "0.28.2", - "@esbuild/android-arm64": "0.28.2", - "@esbuild/android-x64": "0.28.2", - "@esbuild/darwin-arm64": "0.28.2", - "@esbuild/darwin-x64": "0.28.2", - "@esbuild/freebsd-arm64": "0.28.2", - "@esbuild/freebsd-x64": "0.28.2", - "@esbuild/linux-arm": "0.28.2", - "@esbuild/linux-arm64": "0.28.2", - "@esbuild/linux-ia32": "0.28.2", - "@esbuild/linux-loong64": "0.28.2", - "@esbuild/linux-mips64el": "0.28.2", - "@esbuild/linux-ppc64": "0.28.2", - "@esbuild/linux-riscv64": "0.28.2", - "@esbuild/linux-s390x": "0.28.2", - "@esbuild/linux-x64": "0.28.2", - "@esbuild/netbsd-arm64": "0.28.2", - "@esbuild/netbsd-x64": "0.28.2", - "@esbuild/openbsd-arm64": "0.28.2", - "@esbuild/openbsd-x64": "0.28.2", - "@esbuild/openharmony-arm64": "0.28.2", - "@esbuild/sunos-x64": "0.28.2", - "@esbuild/win32-arm64": "0.28.2", - "@esbuild/win32-ia32": "0.28.2", - "@esbuild/win32-x64": "0.28.2" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/jsqr": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", - "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==", - "license": "Apache-2.0" - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lucide-react": { - "version": "1.73.0", - "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.73.0.tgz", - "integrity": "sha512-fVOzGviL9mTfHenG1PbCfIceavyGlnpYNSYr+aGZHLRymAJ7DTP6KHuqt0uBkCKAoenr1UVkwSbDIYt2xIesEQ==", - "license": "ISC", - "peerDependencies": { - "@types/react": "*", - "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/nanoid": { - "version": "3.3.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", - "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pngjs": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", - "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/postcss": { - "version": "8.5.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", - "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.20", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/qrcode": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", - "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", - "license": "MIT", - "dependencies": { - "dijkstrajs": "^1.0.1", - "pngjs": "^5.0.0", - "yargs": "^15.3.1" - }, - "bin": { - "qrcode": "bin/qrcode" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "license": "MIT" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "license": "ISC" - }, - "node_modules/rollup": { - "version": "4.68.8", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.8.tgz", - "integrity": "sha512-IHx4DeeTGhoAPke6p1Wlg0JEQFyQoZQQjEe1iD+nhEERk7eoeHK9zyOpVJiGc54Z1MCgI96rN1tD7Ttub8XyPA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.10" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.68.8", - "@rollup/rollup-android-arm64": "4.68.8", - "@rollup/rollup-android-x64": "4.68.8", - "@rollup/rollup-darwin-arm64": "4.68.8", - "@rollup/rollup-darwin-x64": "4.68.8", - "@rollup/rollup-freebsd-arm64": "4.68.8", - "@rollup/rollup-freebsd-x64": "4.68.8", - "@rollup/rollup-linux-arm-gnueabihf": "4.68.8", - "@rollup/rollup-linux-arm-musleabihf": "4.68.8", - "@rollup/rollup-linux-arm64-gnu": "4.68.8", - "@rollup/rollup-linux-arm64-musl": "4.68.8", - "@rollup/rollup-linux-loong64-gnu": "4.68.8", - "@rollup/rollup-linux-loong64-musl": "4.68.8", - "@rollup/rollup-linux-ppc64-gnu": "4.68.8", - "@rollup/rollup-linux-ppc64-musl": "4.68.8", - "@rollup/rollup-linux-riscv64-gnu": "4.68.8", - "@rollup/rollup-linux-riscv64-musl": "4.68.8", - "@rollup/rollup-linux-s390x-gnu": "4.68.8", - "@rollup/rollup-linux-x64-gnu": "4.68.8", - "@rollup/rollup-linux-x64-musl": "4.68.8", - "@rollup/rollup-openbsd-x64": "4.68.8", - "@rollup/rollup-openharmony-arm64": "4.68.8", - "@rollup/rollup-win32-arm64-msvc": "4.68.8", - "@rollup/rollup-win32-ia32-msvc": "4.68.8", - "@rollup/rollup-win32-x64-gnu": "4.68.8", - "@rollup/rollup-win32-x64-msvc": "4.68.8", - "fsevents": "~2.3.2" - } - }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC" - }, - "node_modules/source-map-js": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", - "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", - "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", - "dev": true, - "license": "MIT" - }, - "node_modules/vite": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.8.tgz", - "integrity": "sha512-3tTi78MAKhVk9h+YZVXMQ8POmneJuE97QUPAWtJghHzhH7BAyiqQOC2KZh1DWOsu/USB2cRXhznPByaabvYXfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.27.0 || ^0.28.0", - "fdir": "^6.5.0", - "picomatch": "^4.0.3", - "postcss": "^8.5.6", - "rollup": "^4.43.0", - "tinyglobby": "^0.2.15" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "lightningcss": "^1.21.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "license": "ISC" - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "license": "ISC" - }, - "node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - } - } -} diff --git a/apps/controller/ui/package.json b/apps/controller/ui/package.json deleted file mode 100644 index ffb2785..0000000 --- a/apps/controller/ui/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@abridge/controller-ui", - "private": true, - "type": "module", - "scripts": { - "build": "tsc --noEmit && vite build", - "dev": "vite --host 127.0.0.1" - }, - "dependencies": { - "@abridge/protocol": "file:../../../packages/protocol", - "@chatscope/chat-ui-kit-react": "2.1.1", - "@chatscope/chat-ui-kit-styles": "1.4.0", - "jsqr": "^1.4.0", - "lucide-react": "1.73.0", - "qrcode": "^1.5.4", - "react": "18.3.1", - "react-dom": "18.3.1" - }, - "devDependencies": { - "@types/qrcode": "^1.5.6", - "@types/react": "18.3.28", - "@types/react-dom": "18.3.7", - "typescript": "5.9.3", - "vite": "7.3.8" - } -} diff --git a/apps/controller/ui/src/main.tsx b/apps/controller/ui/src/main.tsx deleted file mode 100644 index 5b7943f..0000000 --- a/apps/controller/ui/src/main.tsx +++ /dev/null @@ -1,1010 +0,0 @@ -import { requestId } from "./webview-compat"; -import React, { useCallback, useEffect, useRef, useState } from "react"; -import { createRoot } from "react-dom/client"; -import { Conversation, ConversationList, Message, MessageList } from "@chatscope/chat-ui-kit-react"; -import { - ArrowLeft, - Check, - ChevronRight, - ListTodo, - LogOut, - MessageCircle, - Mic, - RefreshCw, - Send, - Settings, - Smartphone, - Square, - Users, - X, -} from "lucide-react"; -import { - devicesListSchema, - groupsListSchema, - groupViewSchema, - groupInviteIssuedSchema, - managementUserSchema, - taskDetailSchema, - taskListSchema, - controllerChatSchema, - controllerMessageSchema, - controllerSettingsSchema, - type ControllerSettings, - type DeviceView, - type GroupView, - type TaskView, - type TaskEvent, -} from "@abridge/protocol"; -import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css"; -import "./style.css"; -import { executionSteps } from "./trace"; -import QRCode from "qrcode"; -import jsQR from "jsqr"; - -type ChatMessage = ReturnType; -type User = ReturnType; -type Page = "chat" | "tasks" | "groups" | "settings"; -declare global { - interface Window { - aBridgeController?: { startVoiceInput(): void; cancelVoiceInput(): void }; - } -} -const active = new Set(["approval", "queued", "running", "waiting", "stopping"]); -const labels: Record = { - approval: "待接收人批准", - queued: "排队中", - running: "执行中", - waiting: "等待设备", - stopping: "正在停止", - done: "已完成", - rejected: "已拒绝", - cancelled: "已取消", - stopped: "已停止", - failed: "执行失败", - unknown: "结果待核实", -}; -class ApiError extends Error { - constructor( - message: string, - readonly status: number, - ) { - super(message); - } -} -async function request(path: string, body?: unknown, method = "POST"): Promise { - const response = await fetch(path, { - credentials: "same-origin", - cache: "no-store", - ...(body === undefined - ? {} - : { method, headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) }), - }); - const value: unknown = await response.json(); - if (!response.ok) { - const record = value && typeof value === "object" ? (value as Record) : {}; - const nested = - record.error && typeof record.error === "object" ? (record.error as Record) : {}; - throw new ApiError( - String( - record.message ?? - nested.message ?? - (response.status === 401 ? "登录已过期,请重新登录" : `请求失败(${response.status})`), - ), - response.status, - ); - } - return value; -} -const time = (n: number) => - new Date(n * 1000).toLocaleString("zh-CN", { - month: "numeric", - day: "numeric", - hour: "2-digit", - minute: "2-digit", - }); -function App() { - const [user, setUser] = useState(null), - [loading, setLoading] = useState(true); - const [page, setPage] = useState("chat"), - [error, setError] = useState(""); - const [busy, setBusy] = useState(false), - [text, setText] = useState(""); - const [messages, setMessages] = useState([]), - [devices, setDevices] = useState([]), - [tasks, setTasks] = useState([]), - [groups, setGroups] = useState([]); - const [selectedTask, setSelectedTask] = useState(null), - [detail, setDetail] = useState<{ task: TaskView; events: TaskEvent[] } | null>(null); - const [hasMore, setHasMore] = useState(false); - const [settings, setSettings] = useState(null); - const [settingsNotice, setSettingsNotice] = useState(""); - const sessionVersion = useRef(0); - const loadedOlder = useRef(false); - const [voice, setVoice] = useState("idle"), - [notice, setNotice] = useState(""); - const submitting = useRef(false), - retryRequest = useRef<{ text: string; id: string } | null>(null); - const clearAccount = useCallback(() => { - sessionVersion.current++; - loadedOlder.current = false; - retryRequest.current = null; - window.aBridgeController?.cancelVoiceInput(); - setMessages([]); - setTasks([]); - setGroups([]); - setDevices([]); - setText(""); - setSelectedTask(null); - setDetail(null); - setHasMore(false); - setVoice("idle"); - setNotice(""); - setSettings(null); - setSettingsNotice(""); - setUser(null); - }, []); - const refresh = useCallback(async () => { - const version = sessionVersion.current; - const [chat, deviceList, taskList, groupList, accountSettings] = await Promise.all([ - request("/api/controller/chat"), - request("/api/devices"), - request("/api/tasks"), - request("/api/groups"), - request("/api/controller/settings"), - ]); - if (version !== sessionVersion.current) return; - const parsed = controllerChatSchema.parse(chat); - if (!loadedOlder.current) setHasMore(parsed.has_more); - setMessages((previous) => - [...new Map([...previous, ...parsed.messages].map((message) => [message.id, message])).values()].sort( - (a, b) => a.created_at - b.created_at, - ), - ); - setDevices(devicesListSchema.parse(deviceList).devices); - setTasks(taskListSchema.parse(taskList).tasks); - setGroups(groupsListSchema.parse(groupList).groups); - setSettings(controllerSettingsSchema.parse(accountSettings)); - }, []); - useEffect(() => { - let alive = true; - void request("/api/me") - .then((value) => { - if (alive) setUser(managementUserSchema.parse(value)); - }) - .catch((e) => { - if (alive && !(e instanceof ApiError && e.status === 401)) setError(String(e.message)); - }) - .finally(() => { - if (alive) setLoading(false); - }); - return () => { - alive = false; - }; - }, []); - useEffect(() => { - if (!user) return; - let alive = true, - pending = false; - const poll = async () => { - if (pending || document.hidden) return; - pending = true; - try { - await refresh(); - if (selectedTask) { - const result = taskDetailSchema.parse( - await request(`/api/tasks/${encodeURIComponent(selectedTask)}`), - ); - if (alive) setDetail(result); - } - } catch (e) { - if (alive) { - setError(e instanceof Error ? e.message : "刷新失败"); - if (e instanceof ApiError && e.status === 401) clearAccount(); - } - } finally { - pending = false; - } - }; - void poll(); - const timer = window.setInterval(() => void poll(), 4000); - return () => { - alive = false; - window.clearInterval(timer); - }; - }, [user, refresh, selectedTask, clearAccount]); - useEffect(() => { - const result = (event: Event) => { - const value = (event as CustomEvent<{ text: string }>).detail; - if (typeof value?.text === "string") { - setText((old) => (old ? `${old}\n${value.text}` : value.text)); - setNotice("语音已转为文字,编辑后发送。"); - } - setVoice("idle"); - }; - const failed = (event: Event) => { - setVoice("idle"); - setError((event as CustomEvent<{ message: string }>).detail?.message || "语音识别失败,请输入文字。"); - }; - const state = (event: Event) => - setVoice((event as CustomEvent<{ state: string }>).detail?.state ?? "idle"); - window.addEventListener("abridge:voice-result", result); - window.addEventListener("abridge:voice-error", failed); - window.addEventListener("abridge:voice-state", state); - return () => { - window.removeEventListener("abridge:voice-result", result); - window.removeEventListener("abridge:voice-error", failed); - window.removeEventListener("abridge:voice-state", state); - }; - }, []); - async function perform(action: () => Promise) { - if (submitting.current) return; - submitting.current = true; - setBusy(true); - setError(""); - try { - await action(); - } catch (e) { - setError(e instanceof Error ? e.message : "操作失败,请重试"); - if (e instanceof ApiError && e.status === 401) clearAccount(); - } finally { - submitting.current = false; - setBusy(false); - } - } - async function send() { - const value = text.trim(); - if (!value || busy) return; - await perform(async () => { - if (retryRequest.current?.text !== value) retryRequest.current = { text: value, id: requestId() }; - await request("/api/controller/chat", { request_id: retryRequest.current.id, text: value }); - retryRequest.current = null; - setText(""); - await refresh(); - }); - } - const openTask = (id: string) => { - setDetail(null); - setSelectedTask(id); - setPage("tasks"); - }; - const taskAction = (id: string, action: "stop" | "approve" | "reject") => - perform(async () => { - await request( - `/api/tasks/${encodeURIComponent(id)}/${action === "stop" ? "stop" : "decision"}`, - action === "stop" ? {} : { approve: action === "approve" }, - ); - await refresh(); - if (selectedTask === id) - setDetail(taskDetailSchema.parse(await request(`/api/tasks/${encodeURIComponent(id)}`))); - }); - if (loading) - return ( -
-

正在连接 AI 家…

-
- ); - if (!user) - return ( -
-
- AI 家 AI Home -
-

登录你的账户

-

连接真实设备,提交和管理任务。

- {error && ( -

- {error} -

- )} -
{ - event.preventDefault(); - const form = new FormData(event.currentTarget); - void perform(async () => { - setUser( - managementUserSchema.parse( - await request("/api/login", { - username: form.get("username"), - password: form.get("password"), - }), - ), - ); - }); - }} - > - - - -
-
- ); - return ( -
-
-
- AI 家 - - {page === "chat" ? "Chat" : page === "tasks" ? "任务" : page === "groups" ? "小组" : "设置"} - -
-
- {user.username} - - -
-
- {error && ( -
- {error} - -
- )} - {page === "chat" && ( - <> -
- - - {hasMore && ( -
- -
- )} - {messages.length === 0 && ( - - - 想让设备做什么? -

说出或输入任务,选择目标设备,确认后才会提交执行。

-
-
- )} - {messages.map((message) => ( - - - -
{message.text}
- {time(message.created_at)} -
-
- - - {message.status === "draft" ? ( - - perform(async () => { - await request( - `/api/controller/chat/${message.id}`, - { recipient_id, device_id }, - "PATCH", - ); - await refresh(); - }) - } - confirm={() => - perform(async () => { - await request(`/api/controller/chat/${message.id}/confirm`, {}); - await refresh(); - }) - } - cancel={() => - perform(async () => { - await request(`/api/controller/chat/${message.id}/cancel`, {}); - await refresh(); - }) - } - /> - ) : message.status === "cancelled" ? ( - 已取消,未执行。 - ) : ( - <> - 任务已提交 -

- {labels[tasks.find((t) => t.id === message.task_id)?.status ?? ""] ?? - "正在读取状态"} -

- {message.task_id && ( - - )} - - )} -
-
-
- ))} -
-
-
-
-

- {voice === "listening" - ? "正在聆听…" - : voice === "processing" - ? "正在识别…" - : notice || "先编辑任务,再确认执行"} -

-
- -