The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): restore localized update copy and simplify setup seams
ethernet5c573d298be2
diff --git a/apps/desktop/electron/backend-release-gate.test.ts b/apps/desktop/electron/backend-release-gate.test.tsindex c16a0ae950d..a09687c2623 100644--- a/apps/desktop/electron/backend-release-gate.test.ts+++ b/apps/desktop/electron/backend-release-gate.test.ts@@ -92,8 +92,7 @@ describe('waitForBackendRelease (#74805 first-attempt race)', () => {})it('proceeds at the deadline when the shim is unlocked but PIDs still linger (pre-#74805 escape hatch)', async () => {- // Lingering PIDs past the deadline are the venv-blocker re-scan's job —- // the gate must not invent a new failure mode for them.+ // Lingering PIDs past the deadline are reported, not a new failure mode.const deps = makeDeps({ isPidAlive: () => true })const result = await waitForBackendRelease([4021], deps, 'test', 3 * RELEASE_GATE_POLL_MS)diff --git a/apps/desktop/electron/backend-release-gate.ts b/apps/desktop/electron/backend-release-gate.tsindex 1d0dceb8e19..8dfbb072cfb 100644--- a/apps/desktop/electron/backend-release-gate.ts+++ b/apps/desktop/electron/backend-release-gate.ts@@ -10,15 +10,13 @@* drivers stretch this out), and it need not hold the venv `hermes.exe` shim* at all — so a gate that only probes the shim can pass on its very first* iteration, with zero dwell, while the killed pythons are still- * terminating. The venv-blocker scan downstream has no liveness filter; it- * enumerates those dying processes as holders and aborts the hand-off.- * Result: the FIRST update attempt from the footbar always failed, and the- * manual retry (by which time the table had settled) succeeded.+ * terminating. Waiting for the PIDs prevents handing control to the updater+ * while our own backend is still exiting.** The gate therefore requires BOTH: the shim unlocked AND every PID we have* ever signalled to have actually left the process table. On deadline, the* old shim-only criterion is kept as the escape hatch — lingering PIDs past- * 15s are the venv-blocker re-scan's job, not a new failure mode.+ * 15s are reported to the caller, not a new failure mode.** Extracted into its own dependency-free module (no electron import) so the* gate's decision logic can be asserted directly with fake clocks and fake@@ -96,8 +94,8 @@ export async function waitForBackendRelease(// Deadline reached. Keep the pre-#74805 success criterion — an unlocked// shim — rather than inventing a new failure mode for PIDs that linger- // past the deadline; the venv-blocker re-scan downstream covers that- // residue (and a REAL foreign holder still fails the shim probe).+ // past the deadline. The caller receives lingering PIDs for diagnostics;+ // a locked shim still fails the probe.const lingering = [...killedPids].filter(pid => deps.isPidAlive(pid))if (!deps.isShimLocked()) {diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.tsindex 9cf6a194501..ce5dd3ba79a 100644--- a/apps/desktop/electron/main.ts+++ b/apps/desktop/electron/main.ts@@ -2360,10 +2360,10 @@ const UPDATE_HANDOFF_DWELL_MS = 2500// Gate deps shared by the primary-window boot path and the pool-backend// spawn path. Consulting the on-disk marker, the in-process updateInFlight// flag, AND the successful detached hand-off state is load-bearing (#73822):-// applyUpdates kills its own backend BEFORE the Windows venv-blocker scan but-// only writes the marker AFTER it, so a marker-only gate lets the renderer's-// ~1s reconnect respawn a backend inside the update's own critical section —-// which the scan then reports as a blocker, aborting every update attempt.+// applyUpdates stops its own backend before committing the update hand-off.+// A marker-only gate lets the renderer's reconnect respawn a backend during+// that critical section, racing the update and leaving a live process on the+// runtime being replaced.// The hand-off state closes the later Windows `cmd start` wrapper gap: the// wrapper exits 0 before the real PowerShell script claims the marker, and// `finally` clears updateInFlight immediately after the hand-off is accepted.@@ -11577,8 +11577,8 @@ async function spawnPoolBackend(// Same update mutual exclusion as the primary window's waitForLocalStart// (#73822): pool backends spawn from the same venv, so an ungated respawn- // during applyUpdates' critical section re-locks the venv and trips the- // venv-blocker preflight. No boot-progress UI here — pool backends boot+ // during applyUpdates' critical section starts a backend on the runtime+ // being replaced. No boot-progress UI here — pool backends boot// silently for background profiles — so we only log while parked.{let poolAnnounced = falsediff --git a/apps/desktop/electron/update-gate.test.ts b/apps/desktop/electron/update-gate.test.tsindex 33a1b9dc412..8a4cd2e5f99 100644--- a/apps/desktop/electron/update-gate.test.ts+++ b/apps/desktop/electron/update-gate.test.ts@@ -2,11 +2,9 @@* Tests for electron/update-gate.ts — the update mutual-exclusion gate that* parks local backend spawns while an in-app update is running.*- * The regression this guards (#73822): applyUpdates kills its own backend- * BEFORE the Windows venv-blocker scan but writes the on-disk marker AFTER- * it. A marker-only gate therefore let the renderer's reconnect spawn a- * fresh backend inside the update's own critical section, which the scan- * reported as a blocker — aborting every Desktop update attempt on Windows.+ * The regression this guards (#73822): applyUpdates stops its own backend+ * before committing the hand-off. A marker-only gate lets the renderer's+ * reconnect spawn a fresh backend on the runtime being replaced.* The gate must consult the in-process updateInFlight flag and the successful* detached hand-off state as well.*/diff --git a/apps/desktop/electron/update-gate.ts b/apps/desktop/electron/update-gate.tsindex f7c77c73959..7f537310c42 100644--- a/apps/desktop/electron/update-gate.ts+++ b/apps/desktop/electron/update-gate.ts@@ -8,7 +8,7 @@ import { runBackendStartStep } from './backend-start-cancellation'* Pure, dependency-injected gate that parks local backend spawns while an* in-app update is running (#73822, #50238).*- * Three independent signals mean "an update owns the venv right now":+ * Three independent signals mean "an update owns the local runtime right now":** - the on-disk marker (`HERMES_HOME/.hermes-update-in-progress`), written* by the updater — and by the desktop itself just before hand-off — and@@ -17,14 +17,11 @@ import { runBackendStartStep } from './backend-start-cancellation'* - the successful detached hand-off state, which remains true while this* Desktop is waiting to quit after the wrapper has handed control away.*- * The marker alone is NOT enough (#73822): `applyUpdates` kills its own- * backend early (`releaseBackendLock`) but only writes the marker AFTER the- * Windows venv-blocker scan. Killing the backend drops the renderer's- * WebSocket, the renderer reconnects within ~1s, and a marker-only gate- * happily spawns a fresh backend inside the update's own critical section —- * which `scanVenvBlockers` then reports as a blocker, aborting every update- * attempt forever. Consulting the flag closes that window. On the success- * path the marker is written BEFORE the flag clears in `applyUpdates`'+ * The marker alone is NOT enough (#73822): `applyUpdates` stops its backend+ * early (`releaseBackendLock`) before committing the hand-off. The renderer+ * reconnects after the WebSocket closes; a marker-only gate can spawn a new+ * backend on the runtime being replaced. Consulting the flag closes that+ * window. On success the marker is written BEFORE the flag clears in `applyUpdates`'* `finally`, so there is no instant where both signals are false and a* waiter could slip through mid-update.*/diff --git a/apps/desktop/electron/updater/app-installer.ts b/apps/desktop/electron/updater/app-installer.tsindex 31028b96cb2..fb5aefcf460 100644--- a/apps/desktop/electron/updater/app-installer.ts+++ b/apps/desktop/electron/updater/app-installer.ts@@ -119,7 +119,8 @@ export class AppInstallerStrategy {async apply(): Promise<UpdaterApplyResultWire> {const feedBaseUrl = this.deps.feedBaseUrl- let sourceUri: string | undefined = this.deps.feed?.url+ const feed = this.deps.feed+ let sourceUri: string | undefined = feed?.urlif (sourceUri) {channelPublicBase(sourceUri)@@ -129,7 +130,7 @@ export class AppInstallerStrategy {throw new Error('Native feed authority mismatch')}- if (!newerWindowsVersion(this.deps.feed!.version, this.deps.appVersion)) {+ if (feed && !newerWindowsVersion(feed.version, this.deps.appVersion)) {return { ok: true, mechanism: this.mechanism }}}diff --git a/apps/desktop/scripts/ensure-rolldown-binding.mjs b/apps/desktop/scripts/ensure-rolldown-binding.mjsdeleted file mode 100644index 7f38e80debb..00000000000--- a/apps/desktop/scripts/ensure-rolldown-binding.mjs+++ /dev/null@@ -1,71 +0,0 @@-import { existsSync, readFileSync } from 'node:fs'-import { dirname, join, resolve } from 'node:path'-import { fileURLToPath } from 'node:url'-import { spawnSync } from 'node:child_process'--const rootDir = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..', '..')--// Rolldown's loader already resolves platform, arch and libc; when the native-// package is absent, its load-error chain names the exact `@rolldown/binding-*`-// it wanted, followed by the wasm fallback it also tried. Reuse that verdict-// instead of re-deriving it from `process.platform` (Windows bindings carry a-// `-msvc` suffix, Linux ones `-gnu`/`-musl`).-export function missingRolldownBinding(stderr) {- const names = [...String(stderr ?? '').matchAll(/@rolldown\/binding-[a-z0-9-]+/g)].map(m => m[0])- return names.find(name => !name.includes('wasm32')) ?? null-}--function probeRolldown(root) {- return spawnSync(process.execPath, ['--input-type=module', '--eval', "await import('rolldown')"], {- cwd: root,- encoding: 'utf8'- })-}--function installBinding(root, spec) {- // npm.cmd needs a shell on Windows (Node refuses to spawn .cmd directly).- return spawnSync('npm', ['install', '--no-save', '--package-lock=false', '--include=optional', spec], {- cwd: root,- stdio: 'inherit',- shell: process.platform === 'win32'- })-}--function installedRolldownVersion(root) {- const packagePath = [- join(root, 'node_modules', 'rolldown', 'package.json'),- join(root, 'apps', 'desktop', 'node_modules', 'rolldown', 'package.json')- ].find(existsSync)- return packagePath ? JSON.parse(readFileSync(packagePath, 'utf8')).version : null-}--export function ensureRolldownBinding({- root = rootDir,- probe = probeRolldown,- install = installBinding,- rolldownVersion = installedRolldownVersion-} = {}) {- const initial = probe(root)- if (initial.status === 0) return true-- const name = missingRolldownBinding(initial.stderr)- const version = rolldownVersion(root)- if (!name || !version) {- console.error(initial.stderr?.trim() || 'Rolldown could not load.')- return false- }-- console.warn(`Rolldown could not load; installing ${name}@${version}...`)- if (install(root, `${name}@${version}`).status !== 0) return false-- const repaired = probe(root)- if (repaired.status !== 0) {- console.error(repaired.stderr?.trim() || `Rolldown still cannot load after installing ${name}.`)- return false- }- return true-}--if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {- process.exitCode = ensureRolldownBinding() ? 0 : 1-}diff --git a/apps/desktop/scripts/ensure-rolldown-binding.test.mjs b/apps/desktop/scripts/ensure-rolldown-binding.test.mjsdeleted file mode 100644index 9f8b34b908e..00000000000--- a/apps/desktop/scripts/ensure-rolldown-binding.test.mjs+++ /dev/null@@ -1,43 +0,0 @@-import assert from 'node:assert/strict'-import { test } from 'vitest'--import { ensureRolldownBinding } from './ensure-rolldown-binding.mjs'--// Shape of Node's uncaught-error output when rolldown's loader finds neither-// the native package nor the wasm fallback (cause chain, native first).-const loaderStderr = `Error: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828).- [cause]: Error: Cannot find module '@rolldown/binding-win32-x64-msvc'- [cause]: Error: Cannot find module '@rolldown/binding-wasm32-wasi'`--test('does nothing when Rolldown already loads', () => {- let installs = 0- const ok = ensureRolldownBinding({- root: '/repo',- probe: () => ({ status: 0 }),- install: () => {- installs += 1- return { status: 0 }- }- })-- assert.equal(ok, true)- assert.equal(installs, 0)-})--test('installs the exact native binding the loader asked for, then re-verifies', () => {- let probes = 0- const installs = []- const ok = ensureRolldownBinding({- root: '/repo',- probe: () => ({ status: probes++ === 0 ? 1 : 0, stderr: loaderStderr }),- install: (_root, spec) => {- installs.push(spec)- return { status: 0 }- },- rolldownVersion: () => '1.2.1'- })-- assert.equal(ok, true)- assert.deepEqual(installs, ['@rolldown/[email protected]'])- assert.equal(probes, 2)-})diff --git a/apps/desktop/src/app/settings/local-models-settings.tsx b/apps/desktop/src/app/settings/local-models-settings.tsxindex 9d0af0c976a..f6cc51ddfad 100644--- a/apps/desktop/src/app/settings/local-models-settings.tsx+++ b/apps/desktop/src/app/settings/local-models-settings.tsx@@ -94,7 +94,11 @@ export function LocalModelsSettings(): ReactElement {return <ScopedLocalModelsSettings key={JSON.stringify(localModelsKey(owner))} owner={owner} />}-function ScopedLocalModelsSettings({ owner }: { owner: LocalModelsOwner }): ReactElement {+interface ScopedLocalModelsSettingsProps {+ owner: LocalModelsOwner+}++function ScopedLocalModelsSettings({ owner }: ScopedLocalModelsSettingsProps): ReactElement {const { t } = useI18n()const copy = t.settings.localModelsconst client: QueryClient = useQueryClient()@@ -878,7 +882,12 @@ function browsedModelId(group: HFFileGroup): string {return first.replace(/-\d{5}-of-\d{5}\.gguf$/i, '').replace(/\.gguf$/i, '')}-function BrowseSection({ owner, onChanged }: { owner: LocalModelsOwner; onChanged: () => void }): ReactElement {+interface BrowseSectionProps {+ owner: LocalModelsOwner+ onChanged: () => void+}++function BrowseSection({ owner, onChanged }: BrowseSectionProps): ReactElement {const client: QueryClient = useQueryClient()const { t } = useI18n()const copy = t.settings.localModelsdiff --git a/apps/desktop/src/components/remote-setup/use-remote-probe.ts b/apps/desktop/src/components/remote-setup/use-remote-probe.tsnew file mode 100644index 00000000000..40932610bea--- /dev/null+++ b/apps/desktop/src/components/remote-setup/use-remote-probe.ts@@ -0,0 +1,84 @@+import { useEffect, useRef, useState } from 'react'++import type { DesktopConnectionProbeResult } from '@/global'++type ProbeStatus = 'idle' | 'probing' | 'done' | 'error'++interface RemoteProbeOptions {+ enabled: boolean+ url: string+ revision: number+ onResult: (result: DesktopConnectionProbeResult) => void+ onReset: () => void+}++interface RemoteProbe {+ probe: DesktopConnectionProbeResult | null+ probeStatus: ProbeStatus+ targetSeq: React.RefObject<number>+ invalidateProbe: () => void+ acceptProbe: (result: DesktopConnectionProbeResult) => void+}++export function useRemoteProbe({ enabled, url, revision, onResult, onReset }: RemoteProbeOptions): RemoteProbe {+ const [probe, setProbe] = useState<DesktopConnectionProbeResult | null>(null)+ const [probeStatus, setProbeStatus] = useState<ProbeStatus>('idle')+ const targetSeq = useRef<number>(0)+ const callbacks = useRef({ onResult, onReset })+ callbacks.current = { onResult, onReset }++ const invalidateProbe = (): void => {+ targetSeq.current += 1+ setProbe(null)+ setProbeStatus('idle')+ }++ const acceptProbe = (result: DesktopConnectionProbeResult): void => {+ setProbe(result)+ setProbeStatus(result.reachable ? 'done' : 'error')+ callbacks.current.onResult(result)+ }++ const acceptProbeRef = useRef(acceptProbe)+ acceptProbeRef.current = acceptProbe++ // The debounce depends on the target, not on host render callbacks.+ // eslint-disable-next-line no-restricted-syntax -- request generations, not a reactive value mirror+ useEffect(() => {+ const seq = ++targetSeq.current+ let timer: number | undefined++ const cancel = (): void => {+ targetSeq.current += 1+ window.clearTimeout(timer)+ }++ setProbe(null)+ setProbeStatus('idle')+ callbacks.current.onReset()++ if (!enabled || !/^https?:\/\//i.test(url) || !window.hermesDesktop?.probeConnectionConfig) {+ return cancel+ }++ setProbeStatus('probing')+ timer = window.setTimeout(() => {+ void window.hermesDesktop+ .probeConnectionConfig(url)+ .then(result => {+ if (seq === targetSeq.current) {+ acceptProbeRef.current(result)+ }+ })+ .catch(() => {+ if (seq === targetSeq.current) {+ setProbeStatus('error')+ }+ })+ }, 500)++ return cancel+ }, [enabled, revision, url])++ return { probe, probeStatus, targetSeq, invalidateProbe, acceptProbe }+}diff --git a/apps/desktop/src/components/remote-setup/use-remote-setup.ts b/apps/desktop/src/components/remote-setup/use-remote-setup.tsindex f7c2bc6fe9a..2692c431bfa 100644--- a/apps/desktop/src/components/remote-setup/use-remote-setup.ts+++ b/apps/desktop/src/components/remote-setup/use-remote-setup.ts@@ -1,4 +1,4 @@-import { useEffect, useRef, useState } from 'react'+import { useRef, useState } from 'react'import type { DesktopConnectionConfigInput, DesktopConnectionProbeResult } from '@/global'import { useI18n } from '@/i18n'@@ -6,6 +6,8 @@ import { deriveRemoteAuthProviderShape } from '@/lib/desktop-remote-auth'import { coerceRemoteUrlScheme } from '@/lib/remote-url'import type { NotificationInput } from '@/store/notifications'+import { useRemoteProbe } from './use-remote-probe'+export type RemoteSetupHost = 'first-run' | 'settings' | 'registry'type AuthMode = 'oauth' | 'token'type ProbeStatus = 'idle' | 'probing' | 'done' | 'error'@@ -68,20 +70,43 @@ export function useRemoteSetup(options: RemoteSetupOptions): RemoteSetup {callbacks.current = optionsconst [credentials, setCredentials] = useState<RemoteCredentials>(credentialsFrom)const [revision, setRevision] = useState<number>(0)- const [probe, setProbe] = useState<DesktopConnectionProbeResult | null>(null)- const [probeStatus, setProbeStatus] = useState<ProbeStatus>('idle')+const [signingIn, setSigningIn] = useState<boolean>(false)const [testing, setTesting] = useState<boolean>(false)const [error, setError] = useState<string | null>(null)const [success, setSuccess] = useState<string | null>(null)const [testedKey, setTestedKey] = useState<string | null>(null)- const targetSeq = useRef<number>(0)+const testSeq = useRef<number>(0)const loginSeq = useRef<number>(0)const url = coerceRemoteUrlScheme(credentials.url)const manualAuth = host === 'registry'const probeEnabled = enabled && (!manualAuth || credentials.authMode === 'oauth')+ const { probe, probeStatus, targetSeq, invalidateProbe, acceptProbe } = useRemoteProbe({+ enabled: probeEnabled,+ url,+ revision,+ onReset: (): void => {+ setSigningIn(false)+ setTesting(false)+ setTestedKey(null)+ setSuccess(null)+ },+ onResult: (result: DesktopConnectionProbeResult): void => {+ invalidateTest()++ if (!manualAuth && result.reachable && result.authMode !== 'unknown') {+ const authMode = result.authMode+ setCredentials(current => ({+ ...current,+ authMode,+ oauthConnected: authMode === 'oauth' && current.oauthConnected+ }))+ }+ }+ })+const payload: DesktopConnectionConfigInput = {mode: 'remote',remoteAuthMode: credentials.authMode,@@ -115,11 +140,9 @@ export function useRemoteSetup(options: RemoteSetupOptions): RemoteSetup {}const invalidateTarget = (): void => {- targetSeq.current += 1+ invalidateProbe()loginSeq.current += 1setSigningIn(false)- setProbe(null)- setProbeStatus('idle')invalidateTest()}@@ -157,64 +180,6 @@ export function useRemoteSetup(options: RemoteSetupOptions): RemoteSetup {callbacks.current.onNotice?.({ kind: 'success', title: g.reachableTitle, message })}- const acceptProbe = (result: DesktopConnectionProbeResult): void => {- invalidateTest()- setProbe(result)- setProbeStatus(result.reachable ? 'done' : 'error')-- if (!manualAuth && result.reachable && result.authMode !== 'unknown') {- const authMode = result.authMode- setCredentials(current => ({- ...current,- authMode,- oauthConnected: authMode === 'oauth' && current.oauthConnected- }))- }- }-- // The effect reads current callbacks without restarting its debounce on each host render.- const acceptProbeRef = useRef<(result: DesktopConnectionProbeResult) => void>(acceptProbe)- acceptProbeRef.current = acceptProbe- // eslint-disable-next-line no-restricted-syntax -- request generations, not a reactive value mirror- useEffect(() => {- const seq = ++targetSeq.current- let timer: number | undefined-- const cancel = (): void => {- targetSeq.current += 1- window.clearTimeout(timer)- }-- setProbe(null)- setProbeStatus('idle')- setSigningIn(false)- setTesting(false)- setTestedKey(null)- setSuccess(null)-- if (!probeEnabled || !/^https?:\/\//i.test(url) || !window.hermesDesktop?.probeConnectionConfig) {- return cancel- }-- setProbeStatus('probing')- timer = window.setTimeout(() => {- void window.hermesDesktop- .probeConnectionConfig(url)- .then(result => {- if (seq === targetSeq.current) {- acceptProbeRef.current(result)- }- })- .catch(() => {- if (seq === targetSeq.current) {- setProbeStatus('error')- }- })- }, 500)-- return cancel- }, [probeEnabled, revision, url])-const signIn = async (): Promise<void> => {if (!url || signingIn) {return@@ -308,7 +273,7 @@ export function useRemoteSetup(options: RemoteSetupOptions): RemoteSetup {const result = await window.hermesDesktop.probeConnectionConfig(url)if (current()) {- acceptProbeRef.current(result)+ acceptProbe(result)if (!result.reachable || result.authMode === 'unknown') {reportError(result.error || g.probeError)diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.tsindex e350c33f979..fd1b116618b 100644--- a/apps/desktop/src/i18n/ar.ts+++ b/apps/desktop/src/i18n/ar.ts@@ -2494,6 +2494,8 @@ export const ar = defineLocale({}},updates: {+ discontinuedTitle: 'لم يعد إصدار Hermes هذا مدعومًا',+ discontinuedBody: 'لم يعد إصدار Hermes هذا مدعومًا وقد يتوقف عن العمل — ألغِ تثبيته. ستبقى بياناتك على القرص.',channels: { stable: 'مستقر', canary: 'تجريبي' },bundleSwapPending: 'أعد التشغيل لإكمال التحديث',bundleSwapPendingDesc:diff --git a/apps/desktop/src/i18n/catalog-completeness.test.ts b/apps/desktop/src/i18n/catalog-completeness.test.tsindex 65b48889fff..33facd9ac2b 100644--- a/apps/desktop/src/i18n/catalog-completeness.test.ts+++ b/apps/desktop/src/i18n/catalog-completeness.test.ts@@ -1,12 +1,16 @@import { describe, expect, it } from 'vitest'import { TRANSLATIONS } from './catalog'+import { deOverrides } from './de'+import { esOverrides } from './es'+import { frOverrides } from './fr'import type { Locale } from './types'// Locales that shipped fully translated. They are `defineLocale` overlays like// ja/ru, so an English key added later falls back to English instead of// failing typecheck; these checks keep the translated copy structurally sound.const COMPLETE_LOCALES = ['fr', 'de', 'es'] as const satisfies readonly Locale[]+const completeOverrides = { fr: frOverrides, de: deOverrides, es: esOverrides }type Leaf = { path: string; value: unknown }@@ -37,9 +41,21 @@ const catalogLeaves = (locale: Locale) =>const english = catalogLeaves('en')+it.each(['de', 'es', 'fr', 'ja', 'ru', 'zh', 'zh-hant', 'ar'] as const)(+ '%s renders localized retirement copy instead of English fallback',+ locale => {+ expect(TRANSLATIONS[locale].updates.discontinuedTitle).not.toBe(TRANSLATIONS.en.updates.discontinuedTitle)+ expect(TRANSLATIONS[locale].updates.discontinuedBody).not.toBe(TRANSLATIONS.en.updates.discontinuedBody)+ }+)+describe.each(COMPLETE_LOCALES)('%s desktop catalog', locale => {const catalog = catalogLeaves(locale)+ it('keeps Updates copy in the locale overlay rather than falling back to English', () => {+ expect(Object.keys(completeOverrides[locale].updates).sort()).toEqual(Object.keys(TRANSLATIONS.en.updates).sort())+ })+it('covers exactly the English key set with matching value kinds', () => {expect([...catalog.keys()].sort()).toEqual([...english.keys()].sort())diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.tsindex 280363f1d3c..88cecd53744 100644--- a/apps/desktop/src/i18n/de.ts+++ b/apps/desktop/src/i18n/de.ts@@ -1,9 +1,9 @@import { defineFieldCopy } from '@/app/settings/field-copy'-import { defineLocale } from './define-locale'+import { defineLocale, type TranslationOverrides } from './define-locale'import { introDe } from './intro-de'-export const de = defineLocale({+export const deOverrides = {intro: introDe,connectors: {title: 'Verbinden Sie Ihre Apps',@@ -2115,6 +2115,7 @@ export const de = defineLocale({}},localModels: {+ connectionChanged: 'Verbindung für lokale Modelle geändert',title: 'Lokale Modelle',runtimeTitle: 'Lokale Laufzeit',runtimeReady: backend => `Bereit · ${backend}`,@@ -4480,6 +4481,61 @@ export const de = defineLocale({}},updates: {+ discontinuedTitle: 'Dieser Hermes-Build wird nicht mehr unterstützt',+ discontinuedBody: 'Dieser Hermes-Build wird nicht mehr unterstützt und funktioniert möglicherweise nicht mehr — deinstallieren Sie ihn. Ihre Daten bleiben auf dem Datenträger.',+ channels: { stable: 'Stabil', canary: 'Canary' },+ appName: 'Hermes',+ availableBodyRelease: tag => `Version ${tag} ist bereit zur Installation.`,+ releaseAvailable: tag => `Version ${tag} ist verfügbar.`,+ checkingShort: 'Wird geprüft…',+ availableBodyAppInstaller: 'Eine neue Hermes-Version ist bereit. Hermes wird geschlossen, Windows schließt das Update ab und Hermes startet automatisch neu.',+ applyingBodyAppInstaller: 'Hermes wird geschlossen und Windows schließt das Update ab. Danach startet Hermes automatisch neu.',+ applyingCloseAppInstaller: 'Dieses Fenster schließt sich, Windows schließt das Update ab und Hermes startet automatisch neu.',+ checkUnknownTitleAppInstaller: 'Update-Check fehlgeschlagen',+ checkUnknownBodyAppInstaller: 'Windows konnte gerade nicht nach Updates suchen. Updates werden auch beim Neustart von Hermes automatisch installiert.',+ versionDetailsTitle: 'Versionsdetails',+ versionDetailsBody: 'Diese Installation wird außerhalb der App verwaltet. Aktualisieren Sie sie auf dieselbe Weise, wie Sie sie installiert haben.',+ versionDetailsVersion: 'Version',+ versionDetailsCommit: 'Commit',+ versionDetailsBuildOrigin: 'Build-Ursprung',+ versionDetailsDistribution: 'Distribution',+ versionDetailsDistributionDesktop: 'Desktop-App',+ versionDetailsDistributionDesktopMsix: 'Desktop-App (MSIX)',+ versionDetailsDistributionDesktopInstaller: 'Desktop-App (Installer)',+ versionDetailsDistributionSourceInstaller: 'Quellcode (Installationsskript)',+ versionDetailsDistributionSource: 'Quellcode',+ versionDetailsDistributionStore: 'Microsoft Store',+ versionDetailsRuntime: 'Laufzeit',+ versionDetailsRuntimeEmbedded: 'Eingebettete Laufzeit',+ versionDetailsRuntimeExternal: 'Extern (nutzt die Laufzeit des Computers)',+ versionDetailsInstallId: 'Installations-ID',+ versionDetailsUncommittedChanges: 'nicht committete Änderungen',+ version: value => `Version ${value}`,+ versionUnavailable: 'Version nicht verfügbar',+ bundleOutOfSync: 'App-Build ist veraltet',+ bundleOutOfSyncDesc:+ 'Die Hermes-Laufzeit wurde aktualisiert, die Desktop-App selbst ist aber noch ein älterer Build – neue Oberflächenfunktionen (wie der Bot-Modus) fehlen, bis sie aktualisiert wird. Führen Sie das Update unten aus, um die App neu zu bauen. Falls das die Warnung nicht behebt, installieren Sie den neuesten Desktop-Installer neu.',+ bundleOutOfSyncAction: 'Installer herunterladen',+ bundleSwapPending: 'Neustart zum Abschließen des Updates',+ bundleSwapPendingDesc:+ 'Die aktualisierte App ist bereits installiert — Hermes muss nur noch neu gestartet werden, um sie zu laden. Chats und Einstellungen bleiben unberührt.',+ bundleSwapPendingAction: 'Hermes neu starten',+ checkNow: 'Jetzt prüfen',+ seeWhatsNew: 'Neuigkeiten ansehen',+ releaseNotes: 'Versionshinweise',+ onLatest: 'Sie verwenden die neueste Version.',+ installing: 'Ein Update wird derzeit installiert.',+ cantReach: 'Der Update-Server konnte nicht erreicht werden.',+ tapCheck: 'Tippen Sie auf „Jetzt prüfen“, um nach Updates zu suchen.',+ updateReady: count => `Ein neues Update ist bereit (${count} Änderung${count === 1 ? '' : 'en'} enthalten).`,+ updateReadyUnknown: 'Ein neues Update ist bereit.',+ lastChecked: age => `Zuletzt geprüft ${age}`,+ justNowSuffix: ' · gerade eben',+ never: 'nie',+ justNow: 'gerade eben',+ minAgo: count => `${count} Min. zuvor`,+ hoursAgo: count => `${count} Std. zuvor`,+ daysAgo: count => `${count} Tage zuvor`,stages: {idle: 'Wird vorbereitet…',prepare: 'Wird vorbereitet…',@@ -5978,4 +6034,6 @@ export const de = defineLocale({toggle: open => `${open ? 'Anzeigen' : 'Ausblenden'}: Sidebar`}}-})+} satisfies TranslationOverrides++export const de = defineLocale(deOverrides)diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.tsindex dccb2a18e65..ced192087aa 100644--- a/apps/desktop/src/i18n/en.ts+++ b/apps/desktop/src/i18n/en.ts@@ -1738,6 +1738,7 @@ export const en: Translations = {}},localModels: {+ connectionChanged: 'Local models connection changed',title: 'Local Models',runtimeTitle: 'Local runtime',runtimeReady: backend => `Ready · ${backend}`,diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.tsindex d2c1bcc549b..07a80d778b2 100644--- a/apps/desktop/src/i18n/es.ts+++ b/apps/desktop/src/i18n/es.ts@@ -1,9 +1,9 @@import { defineFieldCopy } from '@/app/settings/field-copy'-import { defineLocale } from './define-locale'+import { defineLocale, type TranslationOverrides } from './define-locale'import { introEs } from './intro-es'-export const es = defineLocale({+export const esOverrides = {intro: introEs,connectors: {title: 'Conecta tus apps',@@ -2106,6 +2106,7 @@ export const es = defineLocale({}},localModels: {+ connectionChanged: 'Cambió la conexión de los modelos locales',title: 'Modelos locales',runtimeTitle: 'Entorno local',runtimeReady: backend => `Listo · ${backend}`,@@ -4471,6 +4472,62 @@ export const es = defineLocale({}},updates: {+ discontinuedTitle: 'Esta versión de Hermes ya no tiene soporte',+ discontinuedBody: 'Esta versión de Hermes ya no tiene soporte y podría dejar de funcionar; desinstálala. Tus datos permanecen en el disco.',+ channels: { stable: 'Estable', canary: 'Canary' },+ appName: 'Hermes',+ availableBodyRelease: tag => `La versión ${tag} está lista para instalarse.`,+ releaseAvailable: tag => `La versión ${tag} está disponible.`,+ checkingShort: 'Comprobando…',+ availableBodyAppInstaller: 'Hay una nueva versión de Hermes. Hermes se cerrará, Windows terminará la actualización y Hermes volverá a abrirse automáticamente.',+ applyingBodyAppInstaller: 'Hermes se cerrará y Windows terminará la actualización. Hermes volverá a abrirse al finalizar; no tienes que hacer nada.',+ applyingCloseAppInstaller: 'Esta ventana se cerrará; Windows terminará la actualización y Hermes volverá a abrirse automáticamente.',+ checkUnknownTitleAppInstaller: 'No se pudieron buscar actualizaciones',+ checkUnknownBodyAppInstaller: 'Windows no pudo buscar actualizaciones ahora. También se instalan automáticamente al reiniciar Hermes.',+ versionDetailsTitle: 'Detalles de la versión',+ versionDetailsBody: 'Esta instalación se administra fuera de la app. Actualízala de la misma forma en que la instalaste.',+ versionDetailsVersion: 'Versión',+ versionDetailsCommit: 'Commit',+ versionDetailsBuildOrigin: 'Origen de la compilación',+ versionDetailsDistribution: 'Distribución',+ versionDetailsDistributionDesktop: 'Aplicación de escritorio',+ versionDetailsDistributionDesktopMsix: 'Aplicación de escritorio (MSIX)',+ versionDetailsDistributionDesktopInstaller: 'Aplicación de escritorio (instalador)',+ versionDetailsDistributionSourceInstaller: 'Código fuente (script de instalación)',+ versionDetailsDistributionSource: 'Código fuente',+ versionDetailsDistributionStore: 'Microsoft Store',+ versionDetailsRuntime: 'Entorno de ejecución',+ versionDetailsRuntimeEmbedded: 'Entorno de ejecución integrado',+ versionDetailsRuntimeExternal: 'Externo (usa el entorno de ejecución del equipo)',+ versionDetailsInstallId: 'ID de instalación',+ versionDetailsUncommittedChanges: 'cambios sin confirmar',+ version: value => `Versión ${value}`,+ versionUnavailable: 'Versión no disponible',+ bundleOutOfSync: 'La compilación de la app está desactualizada',+ bundleOutOfSyncDesc:+ 'El entorno de ejecución de Hermes se actualizó, pero la app de escritorio sigue siendo una compilación anterior: faltarán funciones nuevas de la interfaz (como el modo Bot) hasta que se actualice. Ejecuta la actualización de abajo para recompilar la app. Si eso no elimina este aviso, reinstala desde el instalador de escritorio más reciente.',+ bundleOutOfSyncAction: 'Obtener el instalador',+ bundleSwapPending: 'Reinicia para terminar la actualización',+ bundleSwapPendingDesc:+ 'La app actualizada ya está instalada; Hermes solo necesita reiniciarse para cargarla. Los chats y los ajustes no se tocan.',+ bundleSwapPendingAction: 'Reiniciar Hermes',+ checkNow: 'Comprobar ahora',+ seeWhatsNew: 'Ver novedades',+ releaseNotes: 'Notas de la versión',+ onLatest: 'Ya tienes la versión más reciente.',+ installing: 'Se está instalando una actualización.',+ cantReach: 'No pudimos contactar con el servidor de actualizaciones.',+ tapCheck: 'Pulsa "Comprobar ahora" para buscar actualizaciones.',+ updateReady: count =>+ `Hay una actualización lista (${count} ${count === 1 ? 'cambio incluido' : 'cambios incluidos'}).`,+ updateReadyUnknown: 'Hay una nueva actualización lista.',+ lastChecked: age => `Última comprobación ${age}`,+ justNowSuffix: ' · ahora mismo',+ never: 'nunca',+ justNow: 'ahora mismo',+ minAgo: count => `hace ${count} min`,+ hoursAgo: count => `hace ${count} h`,+ daysAgo: count => `hace ${count} d`,stages: {idle: 'Preparando…',prepare: 'Preparando…',@@ -5968,4 +6025,6 @@ export const es = defineLocale({toggle: open => `${open ? 'Mostrar' : 'Ocultar'} barra lateral`}}-})+} satisfies TranslationOverrides++export const es = defineLocale(esOverrides)diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.tsindex ca3c0c9883d..0eabdcacf4f 100644--- a/apps/desktop/src/i18n/fr.ts+++ b/apps/desktop/src/i18n/fr.ts@@ -1,9 +1,9 @@import { defineFieldCopy } from '@/app/settings/field-copy'-import { defineLocale } from './define-locale'+import { defineLocale, type TranslationOverrides } from './define-locale'import { introFr } from './intro-fr'-export const fr = defineLocale({+export const frOverrides = {intro: introFr,connectors: {title: 'Connectez vos applications',@@ -2118,6 +2118,7 @@ export const fr = defineLocale({}},localModels: {+ connectionChanged: 'La connexion des modèles locaux a changé',title: 'Modèles locaux',runtimeTitle: 'Moteur local',runtimeReady: backend => `Prêt · ${backend}`,@@ -4491,6 +4492,61 @@ export const fr = defineLocale({}},updates: {+ discontinuedTitle: "Cette version de Hermes n'est plus prise en charge",+ discontinuedBody: "Cette version de Hermes n'est plus prise en charge et risque de ne plus fonctionner — désinstallez-la. Vos données restent sur le disque.",+ channels: { stable: 'Stable', canary: 'Canary' },+ appName: 'Hermes',+ availableBodyRelease: tag => `La version ${tag} est prête à être installée.`,+ releaseAvailable: tag => `La version ${tag} est disponible.`,+ checkingShort: 'Vérification…',+ availableBodyAppInstaller: "Une nouvelle version de Hermes est prête. Hermes va se fermer, Windows terminera la mise à jour, puis Hermes rouvrira automatiquement.",+ applyingBodyAppInstaller: "Hermes va se fermer et Windows terminera la mise à jour. Hermes rouvrira ensuite automatiquement — vous n'avez rien à faire.",+ applyingCloseAppInstaller: 'Cette fenêtre va se fermer, Windows terminera la mise à jour et Hermes rouvrira automatiquement.',+ checkUnknownTitleAppInstaller: 'Impossible de vérifier les mises à jour',+ checkUnknownBodyAppInstaller: "Windows n'a pas pu rechercher les mises à jour. Elles s'installent également automatiquement au redémarrage de Hermes.",+ versionDetailsTitle: 'Détails de la version',+ versionDetailsBody: "Cette installation est gérée hors de l'application. Mettez-la à jour de la même manière que vous l'avez installée.",+ versionDetailsVersion: 'Version',+ versionDetailsCommit: 'Commit',+ versionDetailsBuildOrigin: 'Origine de la compilation',+ versionDetailsDistribution: 'Distribution',+ versionDetailsDistributionDesktop: 'Application Desktop',+ versionDetailsDistributionDesktopMsix: 'Application Desktop (MSIX)',+ versionDetailsDistributionDesktopInstaller: 'Application Desktop (installateur)',+ versionDetailsDistributionSourceInstaller: "Code source (script d'installation)",+ versionDetailsDistributionSource: 'Code source',+ versionDetailsDistributionStore: 'Microsoft Store',+ versionDetailsRuntime: "Environnement d'exécution",+ versionDetailsRuntimeEmbedded: "Environnement d'exécution intégré",+ versionDetailsRuntimeExternal: "Externe (utilise l'environnement d'exécution du système)",+ versionDetailsInstallId: "ID d'installation",+ versionDetailsUncommittedChanges: 'modifications non commitées',+ version: value => `Version ${value}`,+ versionUnavailable: 'Version indisponible',+ bundleOutOfSync: "Version de l'application obsolète",+ bundleOutOfSyncDesc:+ "Le runtime Hermes a été mis à jour, mais l'application Desktop utilise encore une ancienne version. Les nouvelles fonctions de l'interface, comme le mode Bot, resteront absentes jusqu'à sa mise à jour. Lancez la mise à jour ci-dessous pour reconstruire l'application. Si cet avertissement persiste, réinstallez-la avec le dernier installateur Desktop.",+ bundleOutOfSyncAction: "Obtenir l'installateur",+ bundleSwapPending: 'Redémarrez pour terminer la mise à jour',+ bundleSwapPendingDesc:+ "L'application mise à jour est déjà installée — Hermes doit seulement redémarrer pour la charger. Vos conversations et paramètres sont préservés.",+ bundleSwapPendingAction: 'Redémarrer Hermes',+ checkNow: 'Vérifier maintenant',+ seeWhatsNew: 'Voir les nouveautés',+ releaseNotes: 'Notes de version',+ onLatest: 'Vous utilisez la dernière version.',+ installing: "Une mise à jour est en cours d'installation.",+ cantReach: "Impossible d'atteindre le serveur de mises à jour.",+ tapCheck: 'Cliquez sur « Vérifier maintenant » pour rechercher des mises à jour.',+ updateReady: count => `Une nouvelle mise à jour est prête (${count} changement${count === 1 ? '' : 's'} inclus).`,+ updateReadyUnknown: 'Une nouvelle mise à jour est prête.',+ lastChecked: age => `Dernière vérification ${age}`,+ justNowSuffix: " · à l'instant",+ never: 'jamais',+ justNow: "à l'instant",+ minAgo: count => `il y a ${count} min`,+ hoursAgo: count => `il y a ${count} h`,+ daysAgo: count => `il y a ${count} j`,stages: {idle: 'Préparation…',prepare: 'Préparation…',@@ -5988,4 +6044,6 @@ export const fr = defineLocale({toggle: open => `${open ? 'Afficher' : 'Masquer'} la barre latérale`}}-})+} satisfies TranslationOverrides++export const fr = defineLocale(frOverrides)diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.tsindex f2e5279509b..829e8b41faa 100644--- a/apps/desktop/src/i18n/ja.ts+++ b/apps/desktop/src/i18n/ja.ts@@ -1302,6 +1302,7 @@ export const ja = defineLocale({}},localModels: {+ connectionChanged: 'ローカルモデルの接続が変更されました',title: 'ローカルモデル',runtimeTitle: 'ローカルランタイム',runtimeReady: backend => `準備完了 · ${backend}`,@@ -2911,6 +2912,8 @@ export const ja = defineLocale({},updates: {+ discontinuedTitle: 'このHermesビルドはサポートされていません',+ discontinuedBody: 'このHermesビルドはサポートが終了し、動作しなくなる可能性があります。アンインストールしてください。データはディスクに残ります。',channels: { stable: '安定版', canary: '先行版' },bundleSwapPending: '再起動して更新を完了',bundleSwapPendingDesc:diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.tsindex 8073128e03c..270c7eef18d 100644--- a/apps/desktop/src/i18n/ru.ts+++ b/apps/desktop/src/i18n/ru.ts@@ -3147,6 +3147,8 @@ export const ru = defineLocale({}},updates: {+ discontinuedTitle: 'Эта сборка Hermes больше не поддерживается',+ discontinuedBody: 'Эта сборка Hermes больше не поддерживается и может перестать работать — удалите её. Ваши данные останутся на диске.',channels: { stable: 'Стабильный', canary: 'Тестовый' },bundleSwapPending: 'Перезапустите, чтобы завершить обновление',bundleSwapPendingDesc:diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.tsindex 7705bf4f15f..ed8a97043e5 100644--- a/apps/desktop/src/i18n/types.ts+++ b/apps/desktop/src/i18n/types.ts@@ -1469,6 +1469,7 @@ export interface Translations {tasks: Record<string, AuxTaskCopy>}localModels: {+ connectionChanged: stringtitle: stringruntimeTitle: stringruntimeReady: (backend: string) => stringdiff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.tsindex 74a7817f132..24e1e365b8f 100644--- a/apps/desktop/src/i18n/zh-hant.ts+++ b/apps/desktop/src/i18n/zh-hant.ts@@ -1340,6 +1340,7 @@ export const zhHant = defineLocale({}},localModels: {+ connectionChanged: '本地模型連線已變更',title: '本地模型',runtimeTitle: '本地執行環境',runtimeReady: backend => `就緒 · ${backend}`,@@ -3128,6 +3129,8 @@ export const zhHant = defineLocale({},updates: {+ discontinuedTitle: '此版本的 Hermes 已停止支援',+ discontinuedBody: '此版本的 Hermes 已停止支援,可能無法正常運作——請解除安裝。您的資料仍保留在磁碟上。',channels: { stable: '穩定版', canary: '預覽版' },bundleSwapPending: '重新啟動以完成更新',bundleSwapPendingDesc:diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.tsindex aa53585b448..e26873d7b1a 100644--- a/apps/desktop/src/i18n/zh.ts+++ b/apps/desktop/src/i18n/zh.ts@@ -1688,6 +1688,7 @@ export const zh = defineLocale({}},localModels: {+ connectionChanged: '本地模型连接已更改',title: '本地模型',runtimeTitle: '本地运行时',runtimeReady: backend => `就绪 · ${backend}`,@@ -3822,6 +3823,8 @@ export const zh = defineLocale({},updates: {+ discontinuedTitle: '此版本的 Hermes 已停止支持',+ discontinuedBody: '此版本的 Hermes 已停止支持,可能无法正常运行——请卸载。您的数据仍保留在磁盘上。',channels: { stable: '稳定版', canary: '预览版' },bundleSwapPending: '重启以完成更新',bundleSwapPendingDesc: '更新后的应用已安装完成,只需重启 Hermes 即可加载新版本。聊天记录和设置不会受到影响。',diff --git a/apps/desktop/src/store/local-runtime-jobs.ts b/apps/desktop/src/store/local-runtime-jobs.tsindex 47fcacc65d2..36e9a92fb5c 100644--- a/apps/desktop/src/store/local-runtime-jobs.ts+++ b/apps/desktop/src/store/local-runtime-jobs.ts@@ -69,19 +69,23 @@ export function isLocalModelsOwnerLive(owner: LocalModelsOwner): boolean {}export function localModelsRequestScope(owner: LocalModelsOwner): LocalModelsScope {- if (!isLocalModelsOwnerLive(owner)) {- throw new Error('Local models connection changed')- }+ assertLocalModelsOwnerLive(owner)return { connectionId: owner.connectionId, profile: owner.profile }}+export function assertLocalModelsOwnerLive(owner: LocalModelsOwner): void {+ if (!isLocalModelsOwnerLive(owner)) {+ throw new Error(translateNow('settings.localModels.connectionChanged'))+ }+}+export function isCurrentLocalModelsOwner(owner: LocalModelsOwner): boolean {return JSON.stringify(localModelsKey(owner)) === JSON.stringify(localModelsKey(localModelsOwner()))}export function localModelsNotificationTitle(owner: LocalModelsOwner): string {- localModelsRequestScope(owner)+ assertLocalModelsOwnerLive(owner)const title: string = translateNow('settings.localModels.title')return isCurrentLocalModelsOwner(owner)@@ -94,7 +98,7 @@ export function localModelsStatusOptions(owner: LocalModelsOwner): UseQueryOptioqueryKey: localModelsKey(owner, 'status'),queryFn: async (): Promise<LocalModelsStatus> => {const status: LocalModelsStatus = await getLocalModelsStatus(localModelsRequestScope(owner))- localModelsRequestScope(owner)+ assertLocalModelsOwnerLive(owner)return status},@@ -161,7 +165,7 @@ export function localModelsCatalogOptions(owner: LocalModelsOwner): UseQueryOptiqueryKey: localModelsKey(owner, 'catalog'),queryFn: async (): Promise<LocalCatalogModel[]> => {const { models } = await getLocalCatalog(localModelsRequestScope(owner))- localModelsRequestScope(owner)+ assertLocalModelsOwnerLive(owner)return models},@@ -174,7 +178,7 @@ export function localModelsHardwareOptions(owner: LocalModelsOwner): UseQueryOptqueryKey: localModelsKey(owner, 'hardware'),queryFn: async (): Promise<LocalHardware> => {const hardware: LocalHardware = await getLocalHardware(localModelsRequestScope(owner))- localModelsRequestScope(owner)+ assertLocalModelsOwnerLive(owner)return hardware},@@ -194,7 +198,7 @@ export function localModelsJobsOptions(owner: LocalModelsOwner): UseQueryOptionsrefetchOnMount: 'always',queryFn: async (): Promise<readonly LocalRuntimeJob[]> => {const { jobs } = await getLocalModelsJobs(localModelsRequestScope(owner))- localModelsRequestScope(owner)+ assertLocalModelsOwnerLive(owner)// Normalize backend ordering; QueryClient does all structural sharing.return [...jobs].sort((a: LocalRuntimeJob, b: LocalRuntimeJob): number => a.job_id.localeCompare(b.job_id))@@ -476,7 +480,7 @@ export async function checkLocalRuntimeUpdate(owner: LocalModelsOwner = localModtry {const status: LocalModelsStatus = await queryClient.fetchQuery(localModelsStatusOptions(owner))- localModelsRequestScope(owner)+ assertLocalModelsOwnerLive(owner)if (status.enabled && status.update_available && !updateNotified.has(identity)) {updateNotified.add(identity)