The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
Merge current main preserving onboarding and admission identity
Teknium54392d149eea
diff --cc apps/desktop/src/app/chat/composer/index.tsxindex 3ab56e47f13,fb3bf03da01..05f7ca46e48--- a/apps/desktop/src/app/chat/composer/index.tsx+++ b/apps/desktop/src/app/chat/composer/index.tsx@@@ -3,10 -3,10 +3,12 @@@ import { useStore } from '@nanostores/rimport { type ClipboardEvent, type FormEvent, type KeyboardEvent, useCallback, useEffect, useMemo, useRef } from 'react'import { useTourMarker } from '@/app/chat/tour-marker'+import type { GatewayRequester } from '@/app/contrib/types'import { useHudComposerDrag } from '@/app/hud/composer-drag'+import { useBusyInputMode } from '@/app/session/hooks/use-busy-input-mode'import { composerFill, composerFloatingStrip, composerSurfaceGlass } from '@/components/chat/composer-dock'+ import { $chatOnboardingSolo, $chatOnboardingThreadIds } from '@/components/onboarding-chat/assembly'+ import { OnboardingSkip } from '@/components/onboarding-chat/skip'import { Button } from '@/components/ui/button'import { Slot as ContribSlot } from '@/contrib/react/slot'import { useI18n } from '@/i18n'@@@ -1209,12 -1199,7 +1219,13 @@@ export function ChatBar(<div className={cn(composerFloatingStrip, 'px-[5px] pb-1.5 empty:hidden')}><ActionBadges sessionId={statusSessionId} /><SuggestionPills sessionId={statusSessionId} />+ <PreparedImageRecovery+ occupied={hasText || attachments.length > 0 || busy || disabled}+ onRestore={loadIntoComposer}+ request={requestBusyConfig}+ sessionKey={activeQueueSessionKey}+ />+ <OnboardingSkip /></div>{/* Session-scoped status stack (todos, subagents, background tasks,queue). An in-flow dock child: the dock is bottom-anchored, so itdiff --cc apps/desktop/src/app/session/hooks/use-session-actions/index.tsindex 4e2741b3c3d,1b2dd2aef0e..bdfe6270b22--- a/apps/desktop/src/app/session/hooks/use-session-actions/index.ts+++ b/apps/desktop/src/app/session/hooks/use-session-actions/index.ts@@@ -533,10 -532,18 +534,19 @@@ export function useSessionActions()const createBackendSessionForSend = useCallback(- async (preview: string | null = null): Promise<string | null> => {+ async (+ preview: string | null = null,+ seedMessages?: SessionSeedMessage[],+ // Create the session titled or at a pinned reasoning effort (guided+ // onboarding mints its welcome chat this way). The owning profile is NOT+ // an override — point $newChatProfile at it first (selectProfile-style)+ // so the create lands on that profile's own backend and every later+ // ambient RPC follows.+ createOverrides?: SessionCreateOverrides+ ): Promise<string | null> => {const startingStoredSessionId = selectedStoredSessionIdRef.currentconst startingRouteToken = getRouteToken()+ const createIntent = createIntentRef.current ??= crypto.randomUUID()creatingSessionRef.current = true@@@ -564,8 -571,11 +574,12 @@@// reduce the owner to a bare profile name that later RPCs dial on a// different socket than the one that minted the runtime.const capturedRoute = resolveNewChatOwnerRoute()- const params = await desktopSessionCreateParams(cwd, capturedRoute)++ const params = {+ ...(await desktopSessionCreateParams(cwd, capturedRoute)),+ ...sessionCreateOverrideParams(createOverrides, seedMessages)+ }+ params.request_id = createIntent// Lease the owner socket for the whole create → owner-publication// sequence (#93602 primitive). The per-request lease insidediff --cc apps/desktop/src/store/profile.test.tsindex e62dc86a851,179a072ea54..1da7bdc6ab0--- a/apps/desktop/src/store/profile.test.ts+++ b/apps/desktop/src/store/profile.test.ts@@@ -6,18 -6,29 +6,20 @@@ import type { ProfileInfo } from '@/typ// Keep profile.ts's side-effecting imports inert: the gateway socket layer and// the REST query client must not run for real in a unit test.- const ensureGatewayForProfile = vi.fn(async () => undefined)+ const ensureGatewayForProfile = vi.fn(async (_profile: string) => undefined)const ensureGatewayForAgent = vi.fn(async () => undefined)const openGatewayForProfile = vi.fn(async (_profile: string) => undefined)-const openSecondaryCount = vi.fn(() => 0)const $gateway = atom<unknown>({ id: 'live-socket', connectionState: 'open' })const resetStarmapGraph = vi.fn()vi.mock('@/store/gateway', () => ({$gateway,+ // Activation now verifies the socket's route before publishing the profile.+ activeGatewayProfileKey: () => ensureGatewayForProfile.mock.lastCall?.[0] ?? $activeGatewayProfile.get(),ensureGatewayForAgent,ensureGatewayForProfile,- openGatewayForProfile,- openSecondaryCount+ openGatewayForProfile}))-// The pool-limits atom is profile.ts's live saturation signal — keep the real-// one so tests can move the cap via the store, but stub its IPC bridge.-vi.mock('@/store/pool-limits', async () => {- const { atom } = await import('nanostores')-- return { $poolLimits: atom({ idleMs: 600_000, maxBackends: 3 }) }-})vi.mock('@/hermes', () => ({getProfiles: vi.fn(async () => ({ profiles: [] })),setApiRequestProfile: vi.fn()diff --cc apps/desktop/src/store/profile.tsindex 53f6e2e8c05,b2d48892531..e682af79517--- a/apps/desktop/src/store/profile.ts+++ b/apps/desktop/src/store/profile.ts@@@ -21,11 -22,13 +22,11 @@@ importensureGatewayForAgent,ensureGatewayForProfile,openGatewayForAgent,- openGatewayForProfile,- openSecondaryCount+ openGatewayForProfile} from '@/store/gateway'import { notifyError } from '@/store/notifications'-import { $poolLimits } from '@/store/pool-limits'import { notifyRemoteOverrideAuthFailure } from '@/store/profile-remote-override'- import { clearComposerSelectionOwner, setComposerSelectionOwner, setConnection } from '@/store/session'+ import { $connection, clearComposerSelectionOwner, setComposerSelectionOwner, setConnection } from '@/store/session'import type { SessionOwnerRoute } from '@/store/session-request-router'import { resetStarmapGraph } from '@/store/starmap'import type { ProfileInfo } from '@/types/hermes'diff --cc tui_gateway/server.pyindex 75c5e233869,a218deef082..476e81a815c--- a/tui_gateway/server.py+++ b/tui_gateway/server.py@@@ -1953,10 -3232,10 +1955,11 @@@ from . import ( # noqa: E40methods_tools as _methods_tools, prompt_turn as _prompt_turn, billing_view as _billing_view,methods_projects as _methods_projects, methods_session_foreign as _methods_session_foreign,methods_session_control as _methods_session_control, methods_subagents as _methods_subagents,- methods_vault as _methods_vault, methods_free_tier as _methods_free_tier)+ methods_vault as _methods_vault, methods_free_tier as _methods_free_tier,+ methods_connectors as _methods_connectors)for _m in (+ _session_registry, _agent_factory,_session_transports, _session_reaper, _session_lifecycle, _session_workdir, _compute_host_bridge, _model_switch,_session_compression, _change_watcher, _tool_progress, _session_wisdom, _session_notifications,_prompt_attachments, _session_history, _agent_callbacks, _session_auto_continue,