The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fmt(js): `npm run fix` on merge (#107101)
hermes-seaeye[bot]425b00174d0a
diff --git a/apps/desktop/electron/notification-ipc.test.ts b/apps/desktop/electron/notification-ipc.test.tsindex 011ff7c15a6..bd68dba03e8 100644--- a/apps/desktop/electron/notification-ipc.test.ts+++ b/apps/desktop/electron/notification-ipc.test.ts@@ -47,13 +47,18 @@ it('returns native clicks and approval actions to the emitting window, not the pconst focusWindow = vi.fn()registerNativeNotifications({ getMainWindow: () => primary as unknown as BrowserWindow, focusWindow })const notify = host.handle.mock.calls[0][1] as (event: IpcMainInvokeEvent, payload: HermesNotification) => boolean+const payload = {kind: 'approval',sessionId: 'runtime-source',focusSessionId: 'stored-source',title: 'Approval',- actions: [{ id: 'approve', text: 'Approve' }, { id: 'reject', text: 'Reject' }]+ actions: [+ { id: 'approve', text: 'Approve' },+ { id: 'reject', text: 'Reject' }+ ]}+expect(notify({ sender: source.webContents } as unknown as IpcMainInvokeEvent, payload)).toBe(true)expect(focusWindow).not.toHaveBeenCalled()expect(primary.webContents.send).not.toHaveBeenCalled()@@ -89,16 +94,22 @@ it('delivers plugin callbacks to their source and falls back only for navigationactions: [{ id: 'open', text: 'Open', activate: '/plugin/detail' }]})host.shown[0].emit('action', { actionIndex: 0 }, undefined)- expect(source.webContents.send).toHaveBeenCalledWith('hermes:notification-activate', expect.objectContaining({- actionId: 'open',- notifyId: 'source-callback',- activate: '/plugin/detail'- }))+ expect(source.webContents.send).toHaveBeenCalledWith(+ 'hermes:notification-activate',+ expect.objectContaining({+ actionId: 'open',+ notifyId: 'source-callback',+ activate: '/plugin/detail'+ })+ )expect(primary.webContents.send).not.toHaveBeenCalled()source.isDestroyed.mockReturnValue(true)host.shown[0].emit('click')- expect(primary.webContents.send).toHaveBeenCalledWith('hermes:notification-activate', expect.objectContaining({- activate: '/plugin',- notifyId: undefined- }))+ expect(primary.webContents.send).toHaveBeenCalledWith(+ 'hermes:notification-activate',+ expect.objectContaining({+ activate: '/plugin',+ notifyId: undefined+ })+ )})diff --git a/apps/desktop/electron/notification-registry.test.ts b/apps/desktop/electron/notification-registry.test.tsindex 8f23f865e51..2bc6be591f7 100644--- a/apps/desktop/electron/notification-registry.test.ts+++ b/apps/desktop/electron/notification-registry.test.ts@@ -9,6 +9,7 @@ afterEach(() => vi.useRealTimers())it('retains a dismissed banner until its later click or action is consumed', () => {vi.useFakeTimers()const registry = createNotificationRegistry()+for (const event of ['click', 'action']) {const notification = Object.assign(new EventEmitter(), { close: vi.fn() })const handler = vi.fn()@@ -20,13 +21,16 @@ it('retains a dismissed banner until its later click or action is consumed', ()expect(handler).toHaveBeenCalledOnce()expect(registry.has(notification)).toBe(false)}+expect(vi.getTimerCount()).toBe(0)})it('dismisses an expired notification before releasing it and releases failed delivery immediately', () => {vi.useFakeTimers()const registry = createNotificationRegistry({ ttlMs: 1000 })- const notification = Object.assign(new EventEmitter(), { close: vi.fn(() => expect(registry.has(notification)).toBe(true)) })+ const notification = Object.assign(new EventEmitter(), {+ close: vi.fn(() => expect(registry.has(notification)).toBe(true))+ })registry.retain(notification)vi.advanceTimersByTime(1000)expect(notification.close).toHaveBeenCalledOnce()diff --git a/apps/desktop/electron/notification-registry.ts b/apps/desktop/electron/notification-registry.tsindex 95a550a8ce8..c30703a73cb 100644--- a/apps/desktop/electron/notification-registry.ts+++ b/apps/desktop/electron/notification-registry.ts@@ -14,6 +14,7 @@ export function createNotificationRegistry({ ttlMs = NOTIFICATION_RETENTION_TTL_function retain(notification: RetainedNotification): void {live.add(notification)+const release = () => {clearTimeout(timer)live.delete(notification)@@ -32,6 +33,7 @@ export function createNotificationRegistry({ ttlMs = NOTIFICATION_RETENTION_TTL_notification.close()release()}, ttlMs)+timer.unref()}diff --git a/apps/desktop/electron/notification-types.ts b/apps/desktop/electron/notification-types.tsindex e54d52ea3e1..242f2edc186 100644--- a/apps/desktop/electron/notification-types.ts+++ b/apps/desktop/electron/notification-types.ts@@ -16,4 +16,3 @@ export interface HermesNotification {notifyId?: stringactions?: { id: string; text: string; activate?: string }[]}-diff --git a/apps/desktop/src/app/contrib/hooks/notification-focus.test.tsx b/apps/desktop/src/app/contrib/hooks/notification-focus.test.tsxindex d76956dcdd4..0c5cc1ed0e4 100644--- a/apps/desktop/src/app/contrib/hooks/notification-focus.test.tsx+++ b/apps/desktop/src/app/contrib/hooks/notification-focus.test.tsx@@ -7,7 +7,13 @@ import { group } from '@/components/pane-shell/tree/model'import * as tree from '@/components/pane-shell/tree/store'import { registry } from '@/contrib/registry'import { $selectedStoredSessionId } from '@/store/session'-import { $sessionTiles, closeSessionTile, discardSessionTile, openSessionTile, patchSessionTile } from '@/store/session-states'+import {+ $sessionTiles,+ closeSessionTile,+ discardSessionTile,+ openSessionTile,+ patchSessionTile+} from '@/store/session-states'import { useDesktopIntegrations } from './use-desktop-integrations'@@ -21,6 +27,7 @@ beforeAll(() => {render: () => null,title: 'Chat'})+tree.watchContributedPanes()paneMirror({source: $sessionTiles,@@ -80,12 +87,14 @@ it('a native click reveals the existing remote Bot tab without changing its ownesessions: []}))+const scope = {ownerRoute: { connectionId: 'remote-writer', profile: 'writer', mode: 'remote' as const },workspaceMode: 'bots' as const,workspaceOwnerKey: 'remote-writer::writer',workspaceTabTitle: 'Bot Chat'}+openSessionTile('bot-chat', 'center', 'workspace', undefined, scope)patchSessionTile('bot-chat', { runtimeId: 'bot-runtime' })tree.revealTreePane('workspace')diff --git a/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.ts b/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.tsindex ba4c223a748..8c0ba9b47a3 100644--- a/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.ts+++ b/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.ts@@ -216,13 +216,19 @@ export function useDesktopIntegrations({const storedId = viaLocalMap !== sessionId ? viaLocalMap : (storedSessionIdForRuntimeId(sessionId) ?? sessionId)// A notification reveals a tab; it must not reclassify a Bot chat.- const scope = $sessionTiles.get().find(tile => tile.storedSessionId === storedId) ?? $botChatScopes.get()[storedId]+ const scope =+ $sessionTiles.get().find(tile => tile.storedSessionId === storedId) ?? $botChatScopes.get()[storedId]if (isOverlayView(appViewForPath(locationPathname))) {navigate(sessionRoute($selectedStoredSessionId.get() ?? ''), { replace: true })}- openSession(storedId, navigate, 'stack', scope && { ...scope, workspaceMode: scope.workspaceMode ?? 'sessions' })+ openSession(+ storedId,+ navigate,+ 'stack',+ scope && { ...scope, workspaceMode: scope.workspaceMode ?? 'sessions' }+ )}})diff --git a/apps/desktop/src/store/native-notifications.test.ts b/apps/desktop/src/store/native-notifications.test.tsindex 3902fceb74b..09d4d582b1c 100644--- a/apps/desktop/src/store/native-notifications.test.ts+++ b/apps/desktop/src/store/native-notifications.test.ts@@ -74,7 +74,9 @@ it('captures durable navigation identity while keeping the runtime id for approvtry {dispatchNativeNotification({ kind: 'approval', sessionId: runtimeId, title: 'Approval' })- expect(notify).toHaveBeenCalledWith(expect.objectContaining({ sessionId: runtimeId, focusSessionId: 'durable-chat' }))+ expect(notify).toHaveBeenCalledWith(+ expect.objectContaining({ sessionId: runtimeId, focusSessionId: 'durable-chat' })+ )} finally {dropSessionState(runtimeId)}diff --git a/apps/desktop/src/store/native-notifications.ts b/apps/desktop/src/store/native-notifications.tsindex b9bce407895..b622ec258b6 100644--- a/apps/desktop/src/store/native-notifications.ts+++ b/apps/desktop/src/store/native-notifications.ts@@ -212,7 +212,7 @@ export function dispatchNativeNotification(input: NativeNotificationInput): boolactions: input.actions,activate: input.activate,body: input.body,- focusSessionId: input.sessionId ? storedSessionIdForRuntimeId(input.sessionId) ?? undefined : undefined,+ focusSessionId: input.sessionId ? (storedSessionIdForRuntimeId(input.sessionId) ?? undefined) : undefined,icon: input.icon,kind: input.kind,notifyId: input.notifyId,