@tnnevol/dsh-failover-search 7.0.16 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,7 @@ DSH 会话内网页搜索的多来源插件:按 **TinyFish → Tavily → 官
9
9
  插件随 `fn-deepseek-harness` 自动安装。其他 DSH 环境手动安装,要求 DSH `0.2.0-rc.2`:
10
10
 
11
11
  ```sh
12
- dsh plugin --profile web add @tnnevol/dsh-failover-search@7.0.16
12
+ dsh plugin --profile web add @tnnevol/dsh-failover-search@8.1.1
13
13
  ```
14
14
 
15
15
  ## 这个包做什么
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "engines": {
4
- "node": "^22.19.0 || >=24.0.0"
4
+ "node": ">=24.9.0"
5
5
  },
6
6
  "dshPluginApi": {
7
- "version": "0.2.1-rc.5",
7
+ "version": "0.2.2-rc.1",
8
8
  "packages": [
9
9
  "@deepseek-ai/dsh-agent",
10
10
  "@deepseek-ai/dsh-client-locale",
package/lib/client.js CHANGED
@@ -39775,6 +39775,578 @@ window.__ModuleLoader__.load({
39775
39775
  });
39776
39776
  }
39777
39777
  //#endregion
39778
+ //#region src/client/locales.de.ts
39779
+ /** Deutsche Wörter (Schlüsselmenge durch Typ erzwungen). */
39780
+ const de = {
39781
+ sectionTitle: "Plattformnutzung",
39782
+ refreshHint: "Die Nutzung stammt aus den kostenlosen Abfrage-Endpunkten der Plattformen und wird im Hintergrund aktualisiert",
39783
+ refresh: "Aktualisieren",
39784
+ refreshing: "Wird aktualisiert",
39785
+ toggleOn: "Intelligente Suche",
39786
+ loading: "Nutzungsmomentaufnahme wird gelesen…",
39787
+ unavailable: "Nutzungsmomentaufnahme nicht verfügbar",
39788
+ stale: "Die Momentaufnahme ist veraltet, Suchen werden weiterhin normal ausgeführt",
39789
+ fetchedAt: "Abgerufen",
39790
+ tinyfishTitle: "TinyFish",
39791
+ tavilyTitle: "Tavily",
39792
+ noAccount: "Kein Konto konfiguriert",
39793
+ balance: "Guthaben",
39794
+ autoReload: "Automatisches Aufladen",
39795
+ searchRate: "Preis pro Suche",
39796
+ keyUsage: "Key-Nutzung",
39797
+ plan: "Tarif",
39798
+ planUsage: "Tarifnutzung",
39799
+ paygoUsage: "Nutzung nach Verbrauch",
39800
+ formUnavailable: "Diese DSH-Installation stellt die Konfiguration des Plugins auf dieser Seite nicht bereit.",
39801
+ formReadOnly: "Diese Installation speichert Einstellungen schreibgeschützt, Änderungen sind nicht möglich.",
39802
+ formSaveFailed: "Das Speichern ist nicht wirksam geworden; bitte die Eingaben prüfen und erneut versuchen.",
39803
+ formSave: "Speichern",
39804
+ formSaving: "Wird gespeichert…",
39805
+ formOverridden: "Überschrieben",
39806
+ formReset: "Zurücksetzen",
39807
+ formInvalidNumber: "Bitte eine positive ganze Zahl eingeben",
39808
+ accountsTitle: "Plattformkonten",
39809
+ accountsHint: "Pro Plattform lassen sich mehrere Keys hinterlegen; Anfragen verteilen sich reihum auf die Konten derselben Plattform. Keys werden verschlüsselt gespeichert und nie wieder angezeigt.",
39810
+ accountKey: "API-Key",
39811
+ accountKeyPlaceholder: "API-Key der Plattform einfügen",
39812
+ accountLabel: "Bezeichnung",
39813
+ accountLabelPlaceholderTinyfish: "zum Beispiel tinyfish-1",
39814
+ accountLabelPlaceholderTavily: "zum Beispiel tavily-1",
39815
+ accountLabelPlaceholder: "zum Beispiel platform-1",
39816
+ accountAdd: "Konto hinzufügen",
39817
+ accountRemove: "Entfernen",
39818
+ accountCancel: "Abbrechen",
39819
+ accountConfirm: "Hinzufügen",
39820
+ accountEmpty: "Noch kein Konto konfiguriert; diese Plattform ist derzeit deaktiviert.",
39821
+ accountKeepBlank: "Leer lassen, um den gespeicherten Key beizubehalten.",
39822
+ accountIndex: "Konto",
39823
+ accountKeySet: "Key gespeichert",
39824
+ accountEdit: "Bearbeiten",
39825
+ accountCopy: "Key kopieren",
39826
+ accountCopied: "Kopiert",
39827
+ accountCopyFailed: "Kopieren fehlgeschlagen",
39828
+ accountSave: "Speichern",
39829
+ accountEditKeyPlaceholder: "Leer lassen, um den Key nicht zu ändern",
39830
+ accountEditHint: "Leer lassen, um den bisherigen Key beizubehalten; eine geleerte Bezeichnung wird entfernt.",
39831
+ orderTitle: "Ausweichen und Verteilen",
39832
+ sourceOrder: "Reihenfolge der Quellen",
39833
+ sourceOrderHint: "Quellen werden der Reihe nach versucht; die offizielle Suche ist immer beteiligt und dient als letzte Rückfallebene.",
39834
+ sourceOrderOfficial: "Offizielle Suche",
39835
+ timeoutMs: "Zeitlimit pro Quelle (Millisekunden)",
39836
+ timeoutMsHint: "Zeitlimit für eine Suchanfrage pro Konto; es muss unter dem Gesamtbudget der Werkzeugebene bleiben.",
39837
+ samePlatformRetry: "Wiederholung innerhalb der Plattform",
39838
+ samePlatformRetryHint: "Ob nach dem Fehlschlag eines Kontos weitere Konten derselben Plattform versucht werden.",
39839
+ usageTitle: "Nutzungsanzeige und Prüfung",
39840
+ usageRefreshMinutes: "Aktualisierungsintervall der Nutzung (Minuten)",
39841
+ usageRefreshMinutesHint: "Hintergrund-Aktualisierungszyklus der Nutzungsmomentaufnahme, Wertebereich 1–60.",
39842
+ requestProbe: "Prüfung vor der Anfrage",
39843
+ requestProbeHint: "Konten mit zu geringem Kontingent anhand der Momentaufnahme vorab überspringen.",
39844
+ on: "An",
39845
+ off: "Aus"
39846
+ };
39847
+ //#endregion
39848
+ //#region src/client/locales.es.ts
39849
+ /** Palabras en español (conjunto de claves impuesto por el tipo). */
39850
+ const es = {
39851
+ sectionTitle: "Uso de las plataformas",
39852
+ refreshHint: "El uso procede de los puntos de consulta gratuitos de las plataformas y se actualiza en segundo plano",
39853
+ refresh: "Actualizar",
39854
+ refreshing: "Actualizando",
39855
+ toggleOn: "Búsqueda inteligente",
39856
+ loading: "Leyendo la instantánea de uso…",
39857
+ unavailable: "Instantánea de uso no disponible",
39858
+ stale: "La instantánea está desactualizada; las búsquedas se siguen realizando con normalidad",
39859
+ fetchedAt: "Obtenido",
39860
+ tinyfishTitle: "TinyFish",
39861
+ tavilyTitle: "Tavily",
39862
+ noAccount: "Sin cuenta configurada",
39863
+ balance: "Saldo de la cartera",
39864
+ autoReload: "Recarga automática",
39865
+ searchRate: "Precio por búsqueda",
39866
+ keyUsage: "Uso de la clave",
39867
+ plan: "Plan",
39868
+ planUsage: "Uso del plan",
39869
+ paygoUsage: "Uso de pago por uso",
39870
+ formUnavailable: "Esta implementación de DSH no ofrece la configuración de este plugin en esta página.",
39871
+ formReadOnly: "Esta implementación guarda la configuración en modo de solo lectura, así que no se puede modificar.",
39872
+ formSaveFailed: "El guardado no ha surtido efecto; revisa los valores introducidos y vuelve a intentarlo.",
39873
+ formSave: "Guardar",
39874
+ formSaving: "Guardando…",
39875
+ formOverridden: "Sobrescrito",
39876
+ formReset: "Restablecer",
39877
+ formInvalidNumber: "Introduce un número entero positivo",
39878
+ accountsTitle: "Cuentas de las plataformas",
39879
+ accountsHint: "Cada plataforma admite varias claves; las solicitudes se reparten entre las cuentas de la misma plataforma. Las claves se guardan cifradas y nunca se vuelven a mostrar.",
39880
+ accountKey: "Clave de API",
39881
+ accountKeyPlaceholder: "Pega la clave de API de la plataforma",
39882
+ accountLabel: "Etiqueta",
39883
+ accountLabelPlaceholderTinyfish: "por ejemplo tinyfish-1",
39884
+ accountLabelPlaceholderTavily: "por ejemplo tavily-1",
39885
+ accountLabelPlaceholder: "por ejemplo platform-1",
39886
+ accountAdd: "Añadir cuenta",
39887
+ accountRemove: "Eliminar",
39888
+ accountCancel: "Cancelar",
39889
+ accountConfirm: "Añadir",
39890
+ accountEmpty: "No hay ninguna cuenta configurada; esta plataforma está desactivada.",
39891
+ accountKeepBlank: "Déjalo vacío para conservar la clave guardada.",
39892
+ accountIndex: "Cuenta",
39893
+ accountKeySet: "clave guardada",
39894
+ accountEdit: "Editar",
39895
+ accountCopy: "Copiar clave",
39896
+ accountCopied: "Copiado",
39897
+ accountCopyFailed: "No se ha podido copiar",
39898
+ accountSave: "Guardar",
39899
+ accountEditKeyPlaceholder: "Déjalo vacío para no modificar la clave",
39900
+ accountEditHint: "Déjalo vacío para conservar la clave actual; si vacías la etiqueta, se elimina.",
39901
+ orderTitle: "Conmutación y reparto",
39902
+ sourceOrder: "Orden de las fuentes",
39903
+ sourceOrderHint: "Las fuentes se prueban en orden; la búsqueda oficial participa siempre y actúa como último recurso.",
39904
+ sourceOrderOfficial: "Búsqueda oficial",
39905
+ timeoutMs: "Tiempo de espera por fuente (ms)",
39906
+ timeoutMsHint: "Tiempo de espera de una solicitud de búsqueda por cuenta; debe ser menor que el presupuesto total de las herramientas.",
39907
+ samePlatformRetry: "Reintentar en la misma plataforma",
39908
+ samePlatformRetryHint: "Indica si se deben probar las demás cuentas de la plataforma cuando una falla.",
39909
+ usageTitle: "Visualización y sondeo del uso",
39910
+ usageRefreshMinutes: "Intervalo de actualización del uso (minutos)",
39911
+ usageRefreshMinutesHint: "Periodo de actualización en segundo plano de la instantánea de uso, entre 1 y 60.",
39912
+ requestProbe: "Sondeo antes de la solicitud",
39913
+ requestProbeHint: "Omitir por adelantado las cuentas cuya instantánea indica cupo agotado.",
39914
+ on: "Activado",
39915
+ off: "Desactivado"
39916
+ };
39917
+ //#endregion
39918
+ //#region src/client/locales.fr.ts
39919
+ /** Mots français (jeu de clés imposé par le type). */
39920
+ const fr = {
39921
+ sectionTitle: "Utilisation des plateformes",
39922
+ refreshHint: "L'utilisation provient des points de terminaison de requête gratuits des plateformes et se rafraîchit en arrière-plan",
39923
+ refresh: "Actualiser",
39924
+ refreshing: "Actualisation",
39925
+ toggleOn: "Recherche intelligente",
39926
+ loading: "Lecture de l'instantané d'utilisation…",
39927
+ unavailable: "Instantané d'utilisation indisponible",
39928
+ stale: "L'instantané est obsolète ; les recherches continuent normalement",
39929
+ fetchedAt: "Récupéré",
39930
+ tinyfishTitle: "TinyFish",
39931
+ tavilyTitle: "Tavily",
39932
+ noAccount: "Aucun compte configuré",
39933
+ balance: "Solde du portefeuille",
39934
+ autoReload: "Recharge automatique",
39935
+ searchRate: "Prix par recherche",
39936
+ keyUsage: "Utilisation de la clé",
39937
+ plan: "Forfait",
39938
+ planUsage: "Utilisation du forfait",
39939
+ paygoUsage: "Utilisation facturée à l'usage",
39940
+ formUnavailable: "Ce déploiement DSH ne fournit pas la configuration de ce plugin sur cette page.",
39941
+ formReadOnly: "Ce déploiement enregistre la configuration en lecture seule ; aucune modification n'est possible.",
39942
+ formSaveFailed: "L'enregistrement n'a pas pris effet ; vérifiez les valeurs saisies et réessayez.",
39943
+ formSave: "Enregistrer",
39944
+ formSaving: "Enregistrement…",
39945
+ formOverridden: "Remplacé",
39946
+ formReset: "Réinitialiser",
39947
+ formInvalidNumber: "Saisissez un nombre entier positif",
39948
+ accountsTitle: "Comptes des plateformes",
39949
+ accountsHint: "Chaque plateforme accepte plusieurs clés ; les requêtes se répartissent entre les comptes d'une même plateforme. Les clés sont stockées chiffrées et ne sont jamais réaffichées.",
39950
+ accountKey: "Clé API",
39951
+ accountKeyPlaceholder: "Collez la clé API de la plateforme",
39952
+ accountLabel: "Libellé",
39953
+ accountLabelPlaceholderTinyfish: "par exemple tinyfish-1",
39954
+ accountLabelPlaceholderTavily: "par exemple tavily-1",
39955
+ accountLabelPlaceholder: "par exemple platform-1",
39956
+ accountAdd: "Ajouter un compte",
39957
+ accountRemove: "Supprimer",
39958
+ accountCancel: "Annuler",
39959
+ accountConfirm: "Ajouter",
39960
+ accountEmpty: "Aucun compte configuré ; cette plateforme est désactivée.",
39961
+ accountKeepBlank: "Laissez vide pour conserver la clé enregistrée.",
39962
+ accountIndex: "Compte",
39963
+ accountKeySet: "clé enregistrée",
39964
+ accountEdit: "Modifier",
39965
+ accountCopy: "Copier la clé",
39966
+ accountCopied: "Copié",
39967
+ accountCopyFailed: "Échec de la copie",
39968
+ accountSave: "Enregistrer",
39969
+ accountEditKeyPlaceholder: "Laissez vide pour ne pas modifier la clé",
39970
+ accountEditHint: "Laissez vide pour conserver la clé actuelle ; vider le libellé le supprime.",
39971
+ orderTitle: "Basculement et répartition",
39972
+ sourceOrder: "Ordre des sources",
39973
+ sourceOrderHint: "Les sources sont essayées dans l'ordre ; la recherche officielle participe toujours et sert de dernier recours.",
39974
+ sourceOrderOfficial: "Recherche officielle",
39975
+ timeoutMs: "Délai par source (ms)",
39976
+ timeoutMsHint: "Délai d'une requête de recherche par compte ; il doit rester inférieur au budget global des outils.",
39977
+ samePlatformRetry: "Nouvelle tentative dans la plateforme",
39978
+ samePlatformRetryHint: "Indique s'il faut essayer les autres comptes de la plateforme après l'échec d'un compte.",
39979
+ usageTitle: "Affichage et sondage de l'utilisation",
39980
+ usageRefreshMinutes: "Intervalle de rafraîchissement de l'utilisation (minutes)",
39981
+ usageRefreshMinutesHint: "Période de rafraîchissement en arrière-plan de l'instantané d'utilisation, entre 1 et 60.",
39982
+ requestProbe: "Sondage avant requête",
39983
+ requestProbeHint: "Ignorer par avance les comptes dont l'instantané indique un quota épuisé.",
39984
+ on: "Activé",
39985
+ off: "Désactivé"
39986
+ };
39987
+ //#endregion
39988
+ //#region src/client/locales.it.ts
39989
+ /** Dizionario italiano (insieme di chiavi vincolato dal tipo). */
39990
+ const it = {
39991
+ sectionTitle: "Consumo delle piattaforme",
39992
+ refreshHint: "Il consumo proviene dagli endpoint gratuiti delle piattaforme e si aggiorna in background",
39993
+ refresh: "Aggiorna",
39994
+ refreshing: "Aggiornamento",
39995
+ toggleOn: "Ricerca intelligente",
39996
+ loading: "Lettura dello snapshot di consumo…",
39997
+ unavailable: "Snapshot di consumo non disponibile",
39998
+ stale: "Lo snapshot è scaduto; le ricerche vengono comunque eseguite",
39999
+ fetchedAt: "Orario di rilevamento",
40000
+ tinyfishTitle: "TinyFish",
40001
+ tavilyTitle: "Tavily",
40002
+ noAccount: "Nessun account configurato",
40003
+ balance: "Saldo del portafoglio",
40004
+ autoReload: "Ricarica automatica",
40005
+ searchRate: "Prezzo per ricerca",
40006
+ keyUsage: "Utilizzo delle key",
40007
+ plan: "Piano",
40008
+ planUsage: "Consumo del piano",
40009
+ paygoUsage: "Consumo a consumo",
40010
+ formUnavailable: "Questa istanza di DSH non espone a questa pagina la configurazione del plugin.",
40011
+ formReadOnly: "Questa istanza salva le impostazioni in sola lettura, quindi non è possibile modificarle.",
40012
+ formSaveFailed: "Il salvataggio non ha avuto effetto: controlla i valori inseriti e riprova.",
40013
+ formSave: "Salva",
40014
+ formSaving: "Salvataggio…",
40015
+ formOverridden: "Sovrascritto",
40016
+ formReset: "Reimposta",
40017
+ formInvalidNumber: "Inserisci un numero intero positivo",
40018
+ accountsTitle: "Account delle piattaforme",
40019
+ accountsHint: "Ogni piattaforma può avere più key: le richieste vengono distribuite a rotazione tra gli account della stessa piattaforma. Le key sono memorizzate cifrate e non vengono mai mostrate.",
40020
+ accountKey: "API key",
40021
+ accountKeyPlaceholder: "Incolla la API key della piattaforma",
40022
+ accountLabel: "Etichetta",
40023
+ accountLabelPlaceholderTinyfish: "ad esempio tinyfish-1",
40024
+ accountLabelPlaceholderTavily: "ad esempio tavily-1",
40025
+ accountLabelPlaceholder: "ad esempio platform-1",
40026
+ accountAdd: "Aggiungi account",
40027
+ accountRemove: "Rimuovi",
40028
+ accountCancel: "Annulla",
40029
+ accountConfirm: "Aggiungi",
40030
+ accountEmpty: "Nessun account configurato: la piattaforma è attualmente disattivata.",
40031
+ accountKeepBlank: "Lascia vuoto per mantenere la key memorizzata.",
40032
+ accountIndex: "Account",
40033
+ accountKeySet: "key memorizzata",
40034
+ accountEdit: "Modifica",
40035
+ accountCopy: "Copia la key",
40036
+ accountCopied: "Copiato",
40037
+ accountCopyFailed: "Copia non riuscita",
40038
+ accountSave: "Salva",
40039
+ accountEditKeyPlaceholder: "Lascia vuoto per non modificare la key",
40040
+ accountEditHint: "Lascia vuoto per mantenere la key attuale; svuotando l'etichetta la rimuovi.",
40041
+ orderTitle: "Failover e distribuzione",
40042
+ sourceOrder: "Ordine delle fonti",
40043
+ sourceOrderHint: "Le fonti vengono provate in ordine; la ricerca ufficiale partecipa sempre come ultimo fallback.",
40044
+ sourceOrderOfficial: "Ricerca ufficiale",
40045
+ timeoutMs: "Timeout per fonte (ms)",
40046
+ timeoutMsHint: "Timeout di una singola richiesta di ricerca per account; deve restare sotto il budget complessivo dello strumento.",
40047
+ samePlatformRetry: "Riprova sulla stessa piattaforma",
40048
+ samePlatformRetryHint: "Se, dopo il fallimento di un account, provare gli altri account della stessa piattaforma.",
40049
+ usageTitle: "Visualizzazione e verifica del consumo",
40050
+ usageRefreshMinutes: "Intervallo di aggiornamento del consumo (minuti)",
40051
+ usageRefreshMinutesHint: "Periodo di aggiornamento in background dello snapshot di consumo, da 1 a 60.",
40052
+ requestProbe: "Verifica prima della richiesta",
40053
+ requestProbeHint: "Salta in anticipo gli account con quota esaurita in base allo snapshot di consumo.",
40054
+ on: "Attivo",
40055
+ off: "Disattivo"
40056
+ };
40057
+ //#endregion
40058
+ //#region src/client/locales.ja.ts
40059
+ /**
40060
+ * 日本語辞書(键集合与 zh 一致,由类型约束)。
40061
+ *
40062
+ * 键集合由 `UsageLocaleKey` 在编译期约束,缺键或多键都会 typecheck 失败。
40063
+ */
40064
+ const ja = {
40065
+ sectionTitle: "プラットフォームの使用量",
40066
+ refreshHint: "使用量はプラットフォームの無料照会エンドポイントから取得し、バックグラウンドで自動更新します",
40067
+ refresh: "更新",
40068
+ refreshing: "更新中",
40069
+ toggleOn: "スマート検索",
40070
+ loading: "使用量のスナップショットを読み込んでいます…",
40071
+ unavailable: "使用量のスナップショットを利用できません",
40072
+ stale: "スナップショットが古くなっています。検索自体は通常どおり実行されます",
40073
+ fetchedAt: "取得時刻",
40074
+ tinyfishTitle: "TinyFish",
40075
+ tavilyTitle: "Tavily",
40076
+ noAccount: "アカウント未設定",
40077
+ balance: "ウォレット残高",
40078
+ autoReload: "自動チャージ",
40079
+ searchRate: "検索単価",
40080
+ keyUsage: "キーの使用量",
40081
+ plan: "プラン",
40082
+ planUsage: "プランの使用量",
40083
+ paygoUsage: "従量課金の使用量",
40084
+ formUnavailable: "現在の DSH デプロイは、このページにこのプラグインの設定を提供していません。",
40085
+ formReadOnly: "現在のデプロイは設定を読み取り専用で保存するため、変更できません。",
40086
+ formSaveFailed: "保存が反映されませんでした。入力内容を確認して再試行してください。",
40087
+ formSave: "保存",
40088
+ formSaving: "保存しています…",
40089
+ formOverridden: "上書き済み",
40090
+ formReset: "リセット",
40091
+ formInvalidNumber: "正の整数を入力してください",
40092
+ accountsTitle: "プラットフォームのアカウント",
40093
+ accountsHint: "各プラットフォームには複数のキーを設定できます。リクエストは同じプラットフォームのアカウント間で順に分散されます。キーは暗号化して保存され、画面に再表示されることはありません。",
40094
+ accountKey: "API キー",
40095
+ accountKeyPlaceholder: "プラットフォームの API キーを貼り付け",
40096
+ accountLabel: "表示名",
40097
+ accountLabelPlaceholderTinyfish: "例:tinyfish-1",
40098
+ accountLabelPlaceholderTavily: "例:tavily-1",
40099
+ accountLabelPlaceholder: "例:platform-1",
40100
+ accountAdd: "アカウントを追加",
40101
+ accountRemove: "削除",
40102
+ accountCancel: "キャンセル",
40103
+ accountConfirm: "追加",
40104
+ accountEmpty: "アカウントが未設定のため、このプラットフォームは現在無効です。",
40105
+ accountKeepBlank: "空欄のままにすると、保存済みのキーを変更しません。",
40106
+ accountIndex: "アカウント",
40107
+ accountKeySet: "キー保存済み",
40108
+ accountEdit: "編集",
40109
+ accountCopy: "キーをコピー",
40110
+ accountCopied: "コピーしました",
40111
+ accountCopyFailed: "コピーに失敗しました",
40112
+ accountSave: "保存",
40113
+ accountEditKeyPlaceholder: "空欄のままにすると、このキーを変更しません",
40114
+ accountEditHint: "空欄のままにすると元のキーを変更しません。表示名を空にすると表示名が削除されます。",
40115
+ orderTitle: "切り替えと分散",
40116
+ sourceOrder: "ソースの順序",
40117
+ sourceOrderHint: "ソースは順番に試されます。公式検索は常に最後のフォールバックとして参加します。",
40118
+ sourceOrderOfficial: "公式検索",
40119
+ timeoutMs: "ソースごとのタイムアウト(ミリ秒)",
40120
+ timeoutMsHint: "アカウントごとの 1 回の検索リクエストのタイムアウトです。ツール全体の予算より小さくしてください。",
40121
+ samePlatformRetry: "同一プラットフォーム内での再試行",
40122
+ samePlatformRetryHint: "あるアカウントが失敗したあと、同じプラットフォームの別アカウントも試すかどうか。",
40123
+ usageTitle: "使用量の表示と事前確認",
40124
+ usageRefreshMinutes: "使用量の更新間隔(分)",
40125
+ usageRefreshMinutesHint: "使用量スナップショットをバックグラウンドで更新する周期です。1〜60 の範囲で指定します。",
40126
+ requestProbe: "リクエスト前の確認",
40127
+ requestProbeHint: "使用量スナップショットに基づき、クォータが不足しているアカウントを事前にスキップします。",
40128
+ on: "オン",
40129
+ off: "オフ"
40130
+ };
40131
+ //#endregion
40132
+ //#region src/client/locales.ko.ts
40133
+ /**
40134
+ * 한국어 사전(键集合与 zh 一致,由类型约束).
40135
+ *
40136
+ * 键集合由 `UsageLocaleKey` 在编译期约束,缺键或多键都会 typecheck 失败。
40137
+ */
40138
+ const ko = {
40139
+ sectionTitle: "플랫폼 사용량",
40140
+ refreshHint: "사용량은 플랫폼의 무료 조회 엔드포인트에서 가져오며 백그라운드에서 자동으로 갱신됩니다",
40141
+ refresh: "새로고침",
40142
+ refreshing: "새로고침 중",
40143
+ toggleOn: "스마트 검색",
40144
+ loading: "사용량 스냅샷을 읽는 중…",
40145
+ unavailable: "사용량 스냅샷을 사용할 수 없음",
40146
+ stale: "스냅샷이 오래되었습니다. 검색은 정상적으로 실행됩니다",
40147
+ fetchedAt: "가져온 시각",
40148
+ tinyfishTitle: "TinyFish",
40149
+ tavilyTitle: "Tavily",
40150
+ noAccount: "계정 미설정",
40151
+ balance: "지갑 잔액",
40152
+ autoReload: "자동 충전",
40153
+ searchRate: "검색 단가",
40154
+ keyUsage: "Key 사용량",
40155
+ plan: "플랜",
40156
+ planUsage: "플랜 사용량",
40157
+ paygoUsage: "종량제 사용량",
40158
+ formUnavailable: "현재 DSH 배포는 이 페이지에 이 플러그인의 설정을 제공하지 않습니다.",
40159
+ formReadOnly: "현재 배포는 설정을 읽기 전용으로 저장하므로 변경할 수 없습니다.",
40160
+ formSaveFailed: "저장이 적용되지 않았습니다. 입력 내용을 확인하고 다시 시도하세요.",
40161
+ formSave: "저장",
40162
+ formSaving: "저장 중…",
40163
+ formOverridden: "재정의됨",
40164
+ formReset: "초기화",
40165
+ formInvalidNumber: "양의 정수를 입력하세요",
40166
+ accountsTitle: "플랫폼 계정",
40167
+ accountsHint: "플랫폼마다 여러 개의 key를 설정할 수 있으며, 요청은 같은 플랫폼의 계정 사이에서 돌아가며 분산됩니다. key는 암호화되어 저장되며 다시 표시되지 않습니다.",
40168
+ accountKey: "API key",
40169
+ accountKeyPlaceholder: "플랫폼 API key 붙여넣기",
40170
+ accountLabel: "표시 이름",
40171
+ accountLabelPlaceholderTinyfish: "예: tinyfish-1",
40172
+ accountLabelPlaceholderTavily: "예: tavily-1",
40173
+ accountLabelPlaceholder: "예: platform-1",
40174
+ accountAdd: "계정 추가",
40175
+ accountRemove: "삭제",
40176
+ accountCancel: "취소",
40177
+ accountConfirm: "추가",
40178
+ accountEmpty: "계정이 설정되지 않아 이 플랫폼은 현재 비활성 상태입니다.",
40179
+ accountKeepBlank: "비워 두면 저장된 key를 변경하지 않습니다.",
40180
+ accountIndex: "계정",
40181
+ accountKeySet: "key 저장됨",
40182
+ accountEdit: "편집",
40183
+ accountCopy: "key 복사",
40184
+ accountCopied: "복사했습니다",
40185
+ accountCopyFailed: "복사 실패",
40186
+ accountSave: "저장",
40187
+ accountEditKeyPlaceholder: "비워 두면 이 key를 변경하지 않습니다",
40188
+ accountEditHint: "비워 두면 기존 key를 유지합니다. 표시 이름을 비우면 표시 이름이 삭제됩니다.",
40189
+ orderTitle: "전환과 분산",
40190
+ sourceOrder: "소스 순서",
40191
+ sourceOrderHint: "소스를 순서대로 시도합니다. 공식 검색은 항상 마지막 대체 수단으로 참여합니다.",
40192
+ sourceOrderOfficial: "공식 검색",
40193
+ timeoutMs: "소스별 타임아웃(밀리초)",
40194
+ timeoutMsHint: "계정 한 건의 검색 요청 타임아웃이며, 도구 전체 예산보다 작아야 합니다.",
40195
+ samePlatformRetry: "같은 플랫폼에서 재시도",
40196
+ samePlatformRetryHint: "한 계정이 실패한 뒤 같은 플랫폼의 다른 계정도 시도할지 여부입니다.",
40197
+ usageTitle: "사용량 표시와 사전 확인",
40198
+ usageRefreshMinutes: "사용량 갱신 간격(분)",
40199
+ usageRefreshMinutesHint: "사용량 스냅샷을 백그라운드에서 갱신하는 주기이며 1~60 범위입니다.",
40200
+ requestProbe: "요청 전 확인",
40201
+ requestProbeHint: "사용량 스냅샷을 기준으로 쿼터가 부족한 계정을 미리 건너뜁니다.",
40202
+ on: "켜기",
40203
+ off: "끄기"
40204
+ };
40205
+ //#endregion
40206
+ //#region src/client/locales.ru.ts
40207
+ /** Русский словарь (набор ключей задан типом). */
40208
+ const ru = {
40209
+ sectionTitle: "Расход платформ",
40210
+ refreshHint: "Данные о расходе берутся из бесплатных эндпоинтов платформ и обновляются в фоне",
40211
+ refresh: "Обновить",
40212
+ refreshing: "Обновление",
40213
+ toggleOn: "Умный поиск",
40214
+ loading: "Чтение снимка расхода…",
40215
+ unavailable: "Снимок расхода недоступен",
40216
+ stale: "Снимок устарел; поиск всё равно выполняется как обычно",
40217
+ fetchedAt: "Время получения",
40218
+ tinyfishTitle: "TinyFish",
40219
+ tavilyTitle: "Tavily",
40220
+ noAccount: "Аккаунт не настроен",
40221
+ balance: "Баланс кошелька",
40222
+ autoReload: "Автопополнение",
40223
+ searchRate: "Цена за поиск",
40224
+ keyUsage: "Использование ключей",
40225
+ plan: "План",
40226
+ planUsage: "Расход по плану",
40227
+ paygoUsage: "Расход по факту",
40228
+ formUnavailable: "Это развёртывание DSH не предоставляет этой странице конфигурацию плагина.",
40229
+ formReadOnly: "В этом развёртывании настройки сохраняются только для чтения, изменить их нельзя.",
40230
+ formSaveFailed: "Сохранение не применилось: проверьте введённые значения и повторите попытку.",
40231
+ formSave: "Сохранить",
40232
+ formSaving: "Сохранение…",
40233
+ formOverridden: "Переопределено",
40234
+ formReset: "Сбросить",
40235
+ formInvalidNumber: "Введите положительное целое число",
40236
+ accountsTitle: "Аккаунты платформ",
40237
+ accountsHint: "Для каждой платформы можно задать несколько ключей; запросы распределяются по очереди между аккаунтами одной платформы. Ключи хранятся в зашифрованном виде и не отображаются.",
40238
+ accountKey: "API-ключ",
40239
+ accountKeyPlaceholder: "Вставьте API-ключ платформы",
40240
+ accountLabel: "Метка",
40241
+ accountLabelPlaceholderTinyfish: "например tinyfish-1",
40242
+ accountLabelPlaceholderTavily: "например tavily-1",
40243
+ accountLabelPlaceholder: "например platform-1",
40244
+ accountAdd: "Добавить аккаунт",
40245
+ accountRemove: "Удалить",
40246
+ accountCancel: "Отмена",
40247
+ accountConfirm: "Добавить",
40248
+ accountEmpty: "Аккаунт не настроен — платформа отключена.",
40249
+ accountKeepBlank: "Оставьте пустым, чтобы сохранить текущий ключ.",
40250
+ accountIndex: "Аккаунт",
40251
+ accountKeySet: "ключ сохранён",
40252
+ accountEdit: "Изменить",
40253
+ accountCopy: "Копировать ключ",
40254
+ accountCopied: "Скопировано",
40255
+ accountCopyFailed: "Не удалось скопировать",
40256
+ accountSave: "Сохранить",
40257
+ accountEditKeyPlaceholder: "Оставьте пустым, чтобы не менять ключ",
40258
+ accountEditHint: "Оставьте пустым, чтобы сохранить текущий ключ; пустая метка удаляет её.",
40259
+ orderTitle: "Переключение и распределение",
40260
+ sourceOrder: "Порядок источников",
40261
+ sourceOrderHint: "Источники пробуются по порядку; официальный поиск всегда участвует как последний резерв.",
40262
+ sourceOrderOfficial: "Официальный поиск",
40263
+ timeoutMs: "Тайм-аут на источник (мс)",
40264
+ timeoutMsHint: "Тайм-аут одного запроса поиска для аккаунта; должен быть меньше общего бюджета инструмента.",
40265
+ samePlatformRetry: "Повтор в той же платформе",
40266
+ samePlatformRetryHint: "Пробовать ли другие аккаунты той же платформы после сбоя одного из них.",
40267
+ usageTitle: "Отображение и проверка расхода",
40268
+ usageRefreshMinutes: "Интервал обновления расхода (минуты)",
40269
+ usageRefreshMinutesHint: "Период фонового обновления снимка расхода, от 1 до 60.",
40270
+ requestProbe: "Проверка перед запросом",
40271
+ requestProbeHint: "Заранее пропускать аккаунты с исчерпанной квотой по снимку расхода.",
40272
+ on: "Вкл.",
40273
+ off: "Выкл."
40274
+ };
40275
+ //#endregion
40276
+ //#region src/client/language-pack.ts
40277
+ /**
40278
+ * 本插件新增的界面语言。
40279
+ *
40280
+ * `id` 用 BCP 47 主标签,与 DSH 内置的 `zh`/`en` 同形,飞牛侧的 `ja-JP`
40281
+ * 这类带地区标签由语言同步模块折成主标签后再匹配;`label` 写该语言的自称,
40282
+ * 语言列表里直接显示,不做二次翻译。
40283
+ */
40284
+ const PLUGIN_LANGUAGES = [
40285
+ {
40286
+ id: "ja",
40287
+ label: "日本語"
40288
+ },
40289
+ {
40290
+ id: "ko",
40291
+ label: "한국어"
40292
+ },
40293
+ {
40294
+ id: "de",
40295
+ label: "Deutsch"
40296
+ },
40297
+ {
40298
+ id: "fr",
40299
+ label: "Français"
40300
+ },
40301
+ {
40302
+ id: "es",
40303
+ label: "Español"
40304
+ },
40305
+ {
40306
+ id: "it",
40307
+ label: "Italiano"
40308
+ },
40309
+ {
40310
+ id: "ru",
40311
+ label: "Русский"
40312
+ }
40313
+ ];
40314
+ /**
40315
+ * 保证七种语言已在语言目录里。
40316
+ *
40317
+ * **必须查现有目录再注册**:`addLanguage` 对已被占用的 id 会抛错,而六个随包插件
40318
+ * 都可能先加载、都想要同一批语言,先到先注册、后到不能报错。
40319
+ *
40320
+ * @returns 释放函数:只回收这次真正新增的定义。
40321
+ */
40322
+ function ensurePluginLanguages(ctx) {
40323
+ const disposers = [];
40324
+ for (const language of PLUGIN_LANGUAGES) {
40325
+ if (ctx.locale.getLocale().locales.some((entry) => entry.id === language.id)) continue;
40326
+ disposers.push(ctx.locale.addLanguage({
40327
+ id: language.id,
40328
+ label: language.label,
40329
+ fallback: "en"
40330
+ }));
40331
+ }
40332
+ return () => {
40333
+ for (const dispose of disposers.reverse()) dispose();
40334
+ };
40335
+ }
40336
+ /**
40337
+ * 用一个语言一份字典的形式登记本插件的命名空间。
40338
+ *
40339
+ * 走单语言非类型化入口而不是双语言类型化入口:类型化入口要求一次给齐全部内置
40340
+ * 语言,新增语言由语言包贡献。键集合完整性由字典文件的
40341
+ * `{ [Key in XxxLocaleKey]: string }` 声明在编译期保证。
40342
+ */
40343
+ function registerPluginDictionaries(ctx, namespace, dictionaries) {
40344
+ const disposers = Object.entries(dictionaries).map(([locale, dict]) => ctx.locale.register(namespace, locale, dict));
40345
+ return () => {
40346
+ for (const dispose of disposers.reverse()) dispose();
40347
+ };
40348
+ }
40349
+ //#endregion
39778
40350
  //#region src/client/usage-view.ts
39779
40351
  /** 各条目在展示层的顺序与标题键。 */
39780
40352
  const DETAIL_LABELS = [
@@ -40122,6 +40694,16 @@ window.__ModuleLoader__.load({
40122
40694
  zh,
40123
40695
  en
40124
40696
  }), "dsh-failover-search: locale");
40697
+ ctx.effect(() => ensurePluginLanguages(ctx), "dsh-failover-search: language pack");
40698
+ ctx.effect(() => registerPluginDictionaries(ctx, NS, {
40699
+ de,
40700
+ es,
40701
+ fr,
40702
+ it,
40703
+ ja,
40704
+ ko,
40705
+ ru
40706
+ }), "dsh-failover-search: locale dictionaries");
40125
40707
  const t = ctx.locale.bind(NS);
40126
40708
  /** 传输层第一参数(频道)已不参与寻址;保留具名常量让调用点保持可读。 */
40127
40709
  const FAILOVER_USAGE_CHANNEL = FAILOVER_ROUTES_PREFIX;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tnnevol/dsh-failover-search",
3
3
  "displayName": "Failover Search",
4
4
  "type": "module",
5
- "version": "7.0.16",
5
+ "version": "8.1.1",
6
6
  "description": "Composite DSH web-search provider that fails over TinyFish → Tavily → official DeepSeek, spreads requests across multiple accounts per platform, and shows platform usage on the plugin page.",
7
7
  "author": "tnnevol",
8
8
  "license": "Apache-2.0",
@@ -51,8 +51,8 @@
51
51
  "locale"
52
52
  ],
53
53
  "engines": {
54
- "node": "^22.19.0 || >=24.0.0",
55
- "dsh": "0.2.1-rc.5"
54
+ "node": ">=24.9.0",
55
+ "dsh": "0.2.2-rc.1"
56
56
  },
57
57
  "dsh": {
58
58
  "bundle": {
@@ -69,45 +69,45 @@
69
69
  }
70
70
  },
71
71
  "peerDependencies": {
72
- "@deepseek-ai/cordis": "^4.0.5",
73
- "@deepseek-ai/dsh-agent": "0.2.1-rc.5",
74
- "@deepseek-ai/dsh-client-locale": "0.2.1-rc.5",
75
- "@deepseek-ai/dsh-client-store": "0.2.1-rc.5",
76
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.5",
77
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.5",
78
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.5",
79
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.5",
80
- "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.5",
81
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.5",
82
- "@deepseek-ai/dsh-credentials": "0.2.1-rc.5",
83
- "@deepseek-ai/dsh-launch-environment": "0.2.1-rc.5",
84
- "@deepseek-ai/dsh-settings": "0.2.1-rc.5",
85
- "@deepseek-ai/dsh-tools": "0.2.1-rc.5",
86
- "@deepseek-ai/dsh-web": "0.2.1-rc.5",
87
- "@deepseek-ai/dsh-web-fetch-http": "0.2.1-rc.5",
88
- "@deepseek-ai/dsh-web-search-deepseek": "0.2.1-rc.5",
89
- "@deepseek-ai/schemastery": "3.18.5",
72
+ "@deepseek-ai/cordis": "^4.1.0",
73
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.1",
74
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
75
+ "@deepseek-ai/dsh-client-store": "0.2.2-rc.1",
76
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.1",
77
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.1",
78
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.1",
79
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
80
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.1",
81
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
82
+ "@deepseek-ai/dsh-credentials": "0.2.2-rc.1",
83
+ "@deepseek-ai/dsh-launch-environment": "0.2.2-rc.1",
84
+ "@deepseek-ai/dsh-settings": "0.2.2-rc.1",
85
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
86
+ "@deepseek-ai/dsh-web": "0.2.2-rc.1",
87
+ "@deepseek-ai/dsh-web-fetch-http": "0.2.2-rc.1",
88
+ "@deepseek-ai/dsh-web-search-deepseek": "0.2.2-rc.1",
89
+ "@deepseek-ai/schemastery": "3.19.0",
90
90
  "react": "^18.3.1"
91
91
  },
92
92
  "devDependencies": {
93
- "@deepseek-ai/cordis": "^4.0.5",
94
- "@deepseek-ai/dsh-agent": "0.2.1-rc.5",
95
- "@deepseek-ai/dsh-client-locale": "0.2.1-rc.5",
96
- "@deepseek-ai/dsh-client-store": "0.2.1-rc.5",
97
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.5",
98
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.5",
99
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.5",
100
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.5",
101
- "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.5",
102
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.5",
103
- "@deepseek-ai/dsh-credentials": "0.2.1-rc.5",
104
- "@deepseek-ai/dsh-launch-environment": "0.2.1-rc.5",
105
- "@deepseek-ai/dsh-settings": "0.2.1-rc.5",
106
- "@deepseek-ai/dsh-tools": "0.2.1-rc.5",
107
- "@deepseek-ai/dsh-web": "0.2.1-rc.5",
108
- "@deepseek-ai/dsh-web-fetch-http": "0.2.1-rc.5",
109
- "@deepseek-ai/dsh-web-search-deepseek": "0.2.1-rc.5",
110
- "@deepseek-ai/schemastery": "3.18.5",
93
+ "@deepseek-ai/cordis": "^4.1.0",
94
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.1",
95
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
96
+ "@deepseek-ai/dsh-client-store": "0.2.2-rc.1",
97
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.1",
98
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.1",
99
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.1",
100
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
101
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.1",
102
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
103
+ "@deepseek-ai/dsh-credentials": "0.2.2-rc.1",
104
+ "@deepseek-ai/dsh-launch-environment": "0.2.2-rc.1",
105
+ "@deepseek-ai/dsh-settings": "0.2.2-rc.1",
106
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
107
+ "@deepseek-ai/dsh-web": "0.2.2-rc.1",
108
+ "@deepseek-ai/dsh-web-fetch-http": "0.2.2-rc.1",
109
+ "@deepseek-ai/dsh-web-search-deepseek": "0.2.2-rc.1",
110
+ "@deepseek-ai/schemastery": "3.19.0",
111
111
  "@midscene/test": "1.16.5",
112
112
  "@midscene/web": "1.16.5",
113
113
  "@types/node": "^22.20.0",
@@ -116,8 +116,8 @@
116
116
  "tsdown": "^0.22.2",
117
117
  "typescript": "^5.9.3",
118
118
  "vitest": "^4.1.8",
119
- "@tnnevol/dsh-semi-ui": "7.0.16",
120
- "@tnnevol/dsh-e2e-kit": "7.0.16"
119
+ "@tnnevol/dsh-semi-ui": "8.1.1",
120
+ "@tnnevol/dsh-e2e-kit": "8.1.1"
121
121
  },
122
122
  "scripts": {
123
123
  "build": "tsdown",