The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(clients): remove agent profile surfaces
Steven Enamakel7265273149d1
diff --git a/app/src/components/settings/panels/CronJobsPanel.tsx b/app/src/components/settings/panels/CronJobsPanel.tsxindex 42e190cb4c..e5cf5a4808 100644--- a/app/src/components/settings/panels/CronJobsPanel.tsx+++ b/app/src/components/settings/panels/CronJobsPanel.tsx@@ -2,8 +2,6 @@ import createDebug from 'debug';import { useCallback, useEffect, useState } from 'react';import { useT } from '../../../lib/i18n/I18nContext';-import { loadAgentProfiles, selectAgentProfiles } from '../../../store/agentProfileSlice';-import { useAppDispatch, useAppSelector } from '../../../store/hooks';import {type CoreCronJob,type CoreCronRun,@@ -26,8 +24,6 @@ const loadCronJobsLog = createDebug('app:settings:CronJobsPanel:loadCronSkills')const CronJobsPanel = () => {const { t } = useT();- const dispatch = useAppDispatch();- const profiles = useAppSelector(selectAgentProfiles);const formatCronError = useCallback((key: string, message: string) => t(key).replace('{message}', message),[t]@@ -75,11 +71,6 @@ const CronJobsPanel = () => {void loadCoreCronJobsOnly();}, [loadCoreCronJobsOnly]);- // Populate the agent-profile attribution picker + job-list labels.- useEffect(() => {- void dispatch(loadAgentProfiles());- }, [dispatch]);-const toggleCoreJob = async (job: CoreCronJob) => {const key = `core-toggle:${job.id}`;setCoreBusyKey(key);@@ -231,7 +222,6 @@ const CronJobsPanel = () => {<CoreJobListloading={loading}coreJobs={coreJobs}- profiles={profiles}coreRunsByJob={coreRunsByJob}coreBusyKey={coreBusyKey}onToggleCoreJob={job => void toggleCoreJob(job)}@@ -260,7 +250,6 @@ const CronJobsPanel = () => {key="cron-form-create"mode="create"open={true}- profiles={profiles}onClose={() => setFormOpen(false)}onCreate={params => handleCreate(params)}onUpdate={handleUpdate}@@ -274,7 +263,6 @@ const CronJobsPanel = () => {mode="edit"job={editingJob}open={true}- profiles={profiles}onClose={() => setEditingJob(null)}onCreate={handleCreate}onUpdate={handleUpdate}diff --git a/app/src/components/settings/panels/ProfileEditorPage.test.tsx b/app/src/components/settings/panels/ProfileEditorPage.test.tsxdeleted file mode 100644index 6cd20a18b7..0000000000--- a/app/src/components/settings/panels/ProfileEditorPage.test.tsx+++ /dev/null@@ -1,220 +0,0 @@-import { configureStore } from '@reduxjs/toolkit';-import { fireEvent, render, screen, waitFor } from '@testing-library/react';-import { Provider } from 'react-redux';-import { MemoryRouter, Route, Routes } from 'react-router-dom';-import { beforeEach, describe, expect, it, vi } from 'vitest';--import { agentProfilesApi } from '../../../services/api/agentProfilesApi';-import agentProfilesReducer from '../../../store/agentProfileSlice';-import type { AgentProfile } from '../../../types/agentProfile';-import ProfileEditorPage from './ProfileEditorPage';--vi.mock('../../../services/api/agentProfilesApi', () => ({- agentProfilesApi: { list: vi.fn(), select: vi.fn(), upsert: vi.fn(), delete: vi.fn() },-}));--const mockNavigate = vi.fn();-vi.mock('react-router-dom', async importOriginal => {- const actual = await importOriginal<typeof import('react-router-dom')>();- return { ...actual, useNavigate: () => mockNavigate };-});--const mockUpsert = vi.mocked(agentProfilesApi.upsert);--function profile(overrides: Partial<AgentProfile> = {}): AgentProfile {- return {- id: 'writer',- name: 'Writer',- description: 'Drafts copy.',- agentId: 'orchestrator',- builtIn: false,- ...overrides,- };-}--function renderAt(path: string, profiles: AgentProfile[] = []) {- const store = configureStore({- reducer: { agentProfiles: agentProfilesReducer },- preloadedState: {- agentProfiles: { profiles, activeProfileId: 'default', status: 'idle' as const, error: null },- },- });- return {- store,- ...render(- <Provider store={store}>- <MemoryRouter initialEntries={[path]}>- <Routes>- <Route path="/settings/profiles/new" element={<ProfileEditorPage />} />- <Route path="/settings/profiles/edit/:id" element={<ProfileEditorPage />} />- </Routes>- </MemoryRouter>- </Provider>- ),- };-}--describe('ProfileEditorPage', () => {- beforeEach(() => {- vi.clearAllMocks();- mockUpsert.mockResolvedValue({ profiles: [], activeProfileId: 'default' });- });-- it('create mode: name drives the slug and Create dispatches an upsert', async () => {- renderAt('/settings/profiles/new');-- const name = screen.getByLabelText('Name');- expect(name).toBeInTheDocument();- fireEvent.change(name, { target: { value: 'My Research' } });- const id = screen.getByLabelText('ID') as HTMLInputElement;- expect(id.value).toBe('my-research'); // auto-slugged-- fireEvent.click(screen.getByText('Create'));- await waitFor(() => expect(mockUpsert).toHaveBeenCalled());- const sent = mockUpsert.mock.calls[0][0];- expect(sent.id).toBe('my-research');- expect(sent.name).toBe('My Research');- expect(sent.includeAgentConversations).toBe(true);- expect(mockNavigate).toHaveBeenCalledWith('/settings/profiles');- });-- it('create mode: a name written outside ASCII still submits, id left to the core', async () => {- // `slugify` keeps ASCII only, so this name resolves to an empty id. The- // core derives `profile-<digest>` from the name; blocking submit here made- // that path unreachable and left the user with no name they could use.- renderAt('/settings/profiles/new');-- fireEvent.change(screen.getByLabelText('Name'), { target: { value: '研究アシスタント' } });- expect((screen.getByLabelText('ID') as HTMLInputElement).value).toBe('');-- fireEvent.click(screen.getByText('Create'));- await waitFor(() => expect(mockUpsert).toHaveBeenCalled());- const sent = mockUpsert.mock.calls[0][0];- expect(sent.id).toBe('');- expect(sent.name).toBe('研究アシスタント');- });-- it('create mode: a punctuation-only name is still refused', async () => {- renderAt('/settings/profiles/new');- fireEvent.change(screen.getByLabelText('Name'), { target: { value: '!!!' } });- fireEvent.click(screen.getByText('Create'));- await waitFor(() => expect(mockUpsert).not.toHaveBeenCalled());- });-- it('disables Create until a non-empty resolved id exists', () => {- renderAt('/settings/profiles/new');- const create = screen.getByText('Create').closest('button')!;- expect(create).toBeDisabled();- // A punctuation-only name still slugs to '' → stays disabled.- fireEvent.change(screen.getByLabelText('Name'), { target: { value: '!!!' } });- expect(create).toBeDisabled();- fireEvent.change(screen.getByLabelText('Name'), { target: { value: 'Ok' } });- expect(create).not.toBeDisabled();- });-- it('edit mode hydrates fields from the existing profile', () => {- renderAt('/settings/profiles/edit/writer', [- profile({- id: 'writer',- name: 'Writer',- description: 'Drafts copy.',- soulMd: 'I am Writer.',- }),- ]);- expect((screen.getByLabelText('Name') as HTMLInputElement).value).toBe('Writer');- expect((screen.getByLabelText('Description') as HTMLTextAreaElement).value).toBe(- 'Drafts copy.'- );- expect((screen.getByLabelText('Soul (SOUL.md)') as HTMLTextAreaElement).value).toBe(- 'I am Writer.'- );- });-- it('shows not-found when editing an id absent from a loaded list', () => {- renderAt('/settings/profiles/edit/ghost', [profile({ id: 'writer' })]);- expect(screen.getByText('Profile not found')).toBeInTheDocument();- });-- it('an All/Selected allowlist accepts a typed chip', () => {- renderAt('/settings/profiles/new');- // Switch the Skills allowlist from All to Selected.- const selectedButtons = screen.getAllByText('Selected');- fireEvent.click(selectedButtons[0]);- const chipInput = screen.getByPlaceholderText('Type an id, press Enter');- fireEvent.change(chipInput, { target: { value: 'deep-research' } });- fireEvent.keyDown(chipInput, { key: 'Enter' });- expect(screen.getByText('deep-research')).toBeInTheDocument();-- // Switching back to All clears the restriction (exercises the All button's- // onChange(null) handler).- fireEvent.click(screen.getAllByText('All')[0]);- expect(screen.queryByPlaceholderText('Type an id, press Enter')).not.toBeInTheDocument();- });-- it('toggles the recall-agent-conversations switch into the saved payload', async () => {- renderAt('/settings/profiles/new');- fireEvent.change(screen.getByLabelText('Name'), { target: { value: 'Scoped' } });- fireEvent.click(screen.getByLabelText('Recall agent conversations')); // true -> false- fireEvent.click(screen.getByText('Create'));- await waitFor(() => expect(mockUpsert).toHaveBeenCalled());- expect(mockUpsert.mock.calls[0][0].includeAgentConversations).toBe(false);- });-- it('defaults the dedicated memory/workspace toggles to off and dispatches them true when flipped', async () => {- renderAt('/settings/profiles/new');- const dedicatedMemory = screen.getByLabelText('Dedicated memory');- const dedicatedWorkspace = screen.getByLabelText('Dedicated workspace');- expect(dedicatedMemory).toHaveAttribute('aria-checked', 'false');- expect(dedicatedWorkspace).toHaveAttribute('aria-checked', 'false');-- fireEvent.change(screen.getByLabelText('Name'), { target: { value: 'Isolated' } });- fireEvent.click(dedicatedMemory);- fireEvent.click(dedicatedWorkspace);- expect(screen.getByLabelText('Dedicated memory')).toHaveAttribute('aria-checked', 'true');- expect(screen.getByLabelText('Dedicated workspace')).toHaveAttribute('aria-checked', 'true');- fireEvent.click(screen.getByText('Create'));-- await waitFor(() => expect(mockUpsert).toHaveBeenCalled());- expect(mockUpsert.mock.calls[0][0].dedicatedMemory).toBe(true);- expect(mockUpsert.mock.calls[0][0].dedicatedWorkspace).toBe(true);- });-- it('edit mode hydrates the dedicated toggles and shows the resolved read-only paths', () => {- renderAt('/settings/profiles/edit/writer', [- profile({- id: 'writer',- name: 'Writer',- dedicatedMemory: true,- dedicatedWorkspace: true,- soulMdFile: '/workspace/personalities/writer/SOUL.md',- workspaceDir: '/action/profiles/writer',- }),- ]);- expect(screen.getByLabelText('Dedicated memory')).toHaveAttribute('aria-checked', 'true');- expect(screen.getByLabelText('Dedicated workspace')).toHaveAttribute('aria-checked', 'true');- expect(screen.getByText('/workspace/personalities/writer/SOUL.md')).toBeInTheDocument();- expect(screen.getByText('/action/profiles/writer')).toBeInTheDocument();- });-- it('hides the resolved read-only path rows when the profile has none', () => {- renderAt('/settings/profiles/edit/writer', [profile({ id: 'writer' })]);- expect(screen.queryByText('SOUL.md file')).not.toBeInTheDocument();- expect(screen.queryByText('Workspace directory')).not.toBeInTheDocument();- expect(screen.queryByText('Skills directory')).not.toBeInTheDocument();- });-- it('shows the resolved skills directory path and hint when present', () => {- renderAt('/settings/profiles/edit/writer', [- profile({- id: 'writer',- name: 'Writer',- skillsDir: '/workspace/personalities/writer/skills',- }),- ]);- expect(screen.getByText('Skills directory')).toBeInTheDocument();- expect(screen.getByText('/workspace/personalities/writer/skills')).toBeInTheDocument();- expect(- screen.getByText('SKILL.md files placed here are private to this profile.')- ).toBeInTheDocument();- });-});diff --git a/app/src/components/settings/panels/ProfileEditorPage.tsx b/app/src/components/settings/panels/ProfileEditorPage.tsxdeleted file mode 100644index 04d980019b..0000000000--- a/app/src/components/settings/panels/ProfileEditorPage.tsx+++ /dev/null@@ -1,572 +0,0 @@-/**- * ProfileEditorPage — Settings > Agent Profiles > (New | Edit).- *- * Full-page editor for an agent *profile* (a "flavour": custom name + SOUL.md,- * runtime defaults, and per-profile allowlists for memory sources, connectors,- * skills, and MCP servers). Distinct from the agent *registry* editor- * (`AgentEditorPage`), which edits sub-agent definitions.- *- * Routes: `/settings/profiles/new` and `/settings/profiles/edit/:id`.- *- * Each allowlist follows the "All / Selected" contract: `null`/`undefined` =- * all (unrestricted); an array = restrict to those ids (empty = none).- */-import { useCallback, useEffect, useMemo, useRef, useState } from 'react';-import { LuX } from 'react-icons/lu';-import { useLocation, useNavigate, useParams } from 'react-router-dom';--import { errorMessage } from '../../../lib/errorMessage';-import { useT } from '../../../lib/i18n/I18nContext';-import { selectAgentProfiles, upsertAgentProfile } from '../../../store/agentProfileSlice';-import { useAppDispatch, useAppSelector } from '../../../store/hooks';-import type { AgentProfile } from '../../../types/agentProfile';-import Alert from '../../ui/Alert';-import Button from '../../ui/Button';-import {- SettingsRow,- SettingsSection,- SettingsSwitch,- SettingsTextArea,- SettingsTextField,-} from '../controls';-import SettingsPanel from '../layout/SettingsPanel';--const MODEL_HINTS = ['hint:reasoning', 'hint:chat', 'hint:agentic', 'hint:coding'];--function slugify(name: string): string {- return name- .trim()- .toLowerCase()- .replace(/[^a-z0-9_-]+/g, '-')- .replace(/^-+|-+$/g, '');-}--/** Normalize an allowlist for save: empty array stays `[]` (= none selected);- * `null` means "all". The chip editor only produces arrays, so callers pass- * `null` explicitly via the All/Selected toggle. */-type Allowlist = string[] | null;--const ProfileEditorPage = () => {- const { t } = useT();- const navigate = useNavigate();- const location = useLocation();- const dispatch = useAppDispatch();- const { id: routeId } = useParams<{ id: string }>();- const profiles = useAppSelector(selectAgentProfiles);- const backToList = useCallback(() => navigate('/settings/profiles'), [navigate, location]);- const isCreate = !routeId;-- const existing = useMemo(- () => (routeId ? profiles.find(p => p.id === routeId) : undefined),- [profiles, routeId]- );-- const [name, setName] = useState('');- const [agentId, setAgentId] = useState('orchestrator');- const [idTouched, setIdTouched] = useState(!isCreate);- const [profileId, setProfileId] = useState('');- const [description, setDescription] = useState('');- const [model, setModel] = useState('');- const [temperature, setTemperature] = useState('');- const [systemPromptSuffix, setSystemPromptSuffix] = useState('');- const [soulMd, setSoulMd] = useState('');- const [includeAgentConversations, setIncludeAgentConversations] = useState(true);- const [memorySources, setMemorySources] = useState<Allowlist>(null);- const [composioIntegrations, setComposioIntegrations] = useState<Allowlist>(null);- const [allowedSkills, setAllowedSkills] = useState<Allowlist>(null);- const [allowedMcpServers, setAllowedMcpServers] = useState<Allowlist>(null);- const [dedicatedMemory, setDedicatedMemory] = useState(false);- const [dedicatedWorkspace, setDedicatedWorkspace] = useState(false);-- const [submitting, setSubmitting] = useState(false);- const [error, setError] = useState<string | null>(null);- const [notFound, setNotFound] = useState(false);- const mountedRef = useRef(true);-- useEffect(() => {- mountedRef.current = true;- return () => {- mountedRef.current = false;- };- }, []);-- // Hydrate form state from the loaded profile (edit mode). This intentionally- // fans out into multiple setters in an effect: the source is async Redux- // state that may arrive after mount, so a keyed remount / lazy initial state- // can't capture it. Mirrors the suppression used by other settings panels.-- useEffect(() => {- if (isCreate) return;- if (!existing) {- // Profiles may still be loading; only flag not-found once a list exists.- if (profiles.length > 0) setNotFound(true);- return;- }- setNotFound(false);- setName(existing.name);- setAgentId(existing.agentId || 'orchestrator');- setProfileId(existing.id);- setDescription(existing.description ?? '');- setModel(existing.modelOverride ?? '');- setTemperature(- existing.temperature === null || existing.temperature === undefined- ? ''- : String(existing.temperature)- );- setSystemPromptSuffix(existing.systemPromptSuffix ?? '');- setSoulMd(existing.soulMd ?? '');- setIncludeAgentConversations(existing.includeAgentConversations ?? true);- setMemorySources(existing.memorySources ?? null);- setComposioIntegrations(existing.composioIntegrations ?? null);- setAllowedSkills(existing.allowedSkills ?? null);- setAllowedMcpServers(existing.allowedMcpServers ?? null);- setDedicatedMemory(existing.dedicatedMemory ?? false);- setDedicatedWorkspace(existing.dedicatedWorkspace ?? false);- }, [existing, isCreate, profiles.length]);-- const handleName = (value: string) => {- setName(value);- if (isCreate && !idTouched) setProfileId(slugify(value));- };-- // Resolved profile id: explicit id on create (falling back to a slug of the- // name), or the existing id on edit.- const resolvedId = (isCreate ? profileId.trim() || slugify(name) : profileId).trim();-- // `slugify` keeps ASCII only, so a name written in Japanese, Chinese, Greek,- // Cyrillic or Arabic resolves to no id at all. The core derives one from the- // name in that case, so a nameable profile must still be submittable —- // otherwise there is no name in those scripts a user can save. A- // punctuation-only name still has nothing to name a profile with, and stays- // blocked as before.- const nameCanCarryAnId = /[\p{L}\p{N}]/u.test(name);-- const canSubmit = !submitting && (isCreate ? resolvedId.length > 0 || nameCanCarryAnId : true);-- const handleSubmit = async () => {- if (!canSubmit) return;- setSubmitting(true);- setError(null);- const id = resolvedId;- if (!id && !nameCanCarryAnId) {- setError(t('settings.profiles.editor.idRequired'));- setSubmitting(false);- return;- }- const tempNum = temperature.trim() === '' ? null : Number(temperature);- const profile: AgentProfile = {- id,- name: name.trim() || id,- description: description.trim(),- agentId: agentId.trim() || 'orchestrator',- modelOverride: model.trim() || null,- temperature: tempNum !== null && Number.isFinite(tempNum) ? tempNum : null,- systemPromptSuffix: systemPromptSuffix.trim() || null,- soulMd: soulMd.trim() || null,- includeAgentConversations,- memorySources,- composioIntegrations,- allowedSkills,- allowedMcpServers,- dedicatedMemory,- dedicatedWorkspace,- builtIn: existing?.builtIn ?? false,- };- try {- await dispatch(upsertAgentProfile(profile)).unwrap();- if (mountedRef.current) backToList();- } catch (err) {- // `.unwrap()` rejects with Redux Toolkit's SerializedError — a plain- // object, not an `Error` — so an `instanceof` guard here rendered- // "[object Object]" and hid the backend's reason (#5900).- if (mountedRef.current) {- setError(errorMessage(err, 'Failed to save profile'));- }- } finally {- if (mountedRef.current) setSubmitting(false);- }- };-- return (- <SettingsPanel- title={- isCreate- ? t('settings.profiles.editor.createTitle')- : t('settings.profiles.editor.editTitle')- }- description={t('settings.profiles.menuDesc')}>- {notFound ? (- <Alert variant="destructive">{t('settings.profiles.editor.notFound')}</Alert>- ) : (- <div className="space-y-5">- {/* Identity */}- <SettingsSection>- <SettingsRow- htmlFor="profile-name"- label={t('settings.profiles.editor.name')}- stacked- control={- <SettingsTextField- id="profile-name"- autoFocus={isCreate}- value={name}- onChange={e => handleName(e.target.value)}- aria-label={t('settings.profiles.editor.name')}- />- }- />- {isCreate ? (- <SettingsRow- htmlFor="profile-id"- label={t('settings.profiles.editor.id')}- description={t('settings.profiles.editor.idHint')}- stacked- control={- <SettingsTextField- id="profile-id"- mono- value={profileId}- onChange={e => {- setIdTouched(true);- setProfileId(e.target.value);- }}- aria-label={t('settings.profiles.editor.id')}- />- }- />- ) : (- <SettingsRow- label={t('settings.profiles.editor.id')}- control={<code className="font-mono text-xs text-content-muted">{profileId}</code>}- />- )}- <SettingsRow- htmlFor="profile-description"- label={t('settings.profiles.editor.description')}- stacked- control={- <SettingsTextArea- id="profile-description"- value={description}- onChange={e => setDescription(e.target.value)}- rows={2}- aria-label={t('settings.profiles.editor.description')}- />- }- />- </SettingsSection>-- {/* Soul */}- <SettingsSection>- <SettingsRow- htmlFor="profile-soul"- label={t('settings.profiles.editor.soul')}- description={t('settings.profiles.editor.soulHint')}- stacked- control={- <SettingsTextArea- id="profile-soul"- value={soulMd}- onChange={e => setSoulMd(e.target.value)}- rows={6}- aria-label={t('settings.profiles.editor.soul')}- />- }- />- </SettingsSection>-- {/* Runtime defaults */}- <SettingsSection>- <SettingsRow- htmlFor="profile-base-agent"- label={t('settings.profiles.editor.baseAgent')}- description={t('settings.profiles.editor.baseAgentHint')}- stacked- control={- <SettingsTextField- id="profile-base-agent"- mono- value={agentId}- onChange={e => setAgentId(e.target.value)}- aria-label={t('settings.profiles.editor.baseAgent')}- />- }- />- <SettingsRow- htmlFor="profile-model"- label={t('settings.profiles.editor.model')}- description={t('settings.profiles.editor.modelHint')}- stacked- control={- <SettingsTextField- id="profile-model"- mono- value={model}- onChange={e => setModel(e.target.value)}- placeholder={MODEL_HINTS.join(', ')}- aria-label={t('settings.profiles.editor.model')}- />- }- />- <SettingsRow- htmlFor="profile-temperature"- label={t('settings.profiles.editor.temperature')}- stacked- control={- <SettingsTextField- id="profile-temperature"- value={temperature}- onChange={e => setTemperature(e.target.value)}- placeholder="0.0 – 1.0"- aria-label={t('settings.profiles.editor.temperature')}- />- }- />- <SettingsRow- htmlFor="profile-suffix"- label={t('settings.profiles.editor.systemPromptSuffix')}- stacked- control={- <SettingsTextArea- id="profile-suffix"- value={systemPromptSuffix}- onChange={e => setSystemPromptSuffix(e.target.value)}- rows={2}- aria-label={t('settings.profiles.editor.systemPromptSuffix')}- />- }- />- </SettingsSection>-- {/* Memory */}- <SettingsSection>- <SettingsRow- label={t('settings.profiles.editor.agentConversations')}- description={t('settings.profiles.editor.agentConversationsHint')}- control={- <SettingsSwitch- id="profile-agent-conversations"- checked={includeAgentConversations}- onCheckedChange={setIncludeAgentConversations}- aria-label={t('settings.profiles.editor.agentConversations')}- />- }- />- <AllowlistField- label={t('settings.profiles.editor.memorySources')}- hint={t('settings.profiles.editor.memorySourcesHint')}- value={memorySources}- onChange={setMemorySources}- />- </SettingsSection>-- {/* Isolation */}- <SettingsSection>- <SettingsRow- label={t('settings.profiles.editor.dedicatedMemory')}- description={t('settings.profiles.editor.dedicatedMemoryHint')}- control={- <SettingsSwitch- id="profile-dedicated-memory"- checked={dedicatedMemory}- onCheckedChange={setDedicatedMemory}- aria-label={t('settings.profiles.editor.dedicatedMemory')}- />- }- />- <SettingsRow- label={t('settings.profiles.editor.dedicatedWorkspace')}- description={t('settings.profiles.editor.dedicatedWorkspaceHint')}- control={- <SettingsSwitch- id="profile-dedicated-workspace"- checked={dedicatedWorkspace}- onCheckedChange={setDedicatedWorkspace}- aria-label={t('settings.profiles.editor.dedicatedWorkspace')}- />- }- />- {existing?.soulMdFile && (- <SettingsRow- label={t('settings.profiles.editor.soulMdFile')}- control={- <code className="font-mono text-xs text-content-muted break-all">- {existing.soulMdFile}- </code>- }- />- )}- {existing?.workspaceDir && (- <SettingsRow- label={t('settings.profiles.editor.workspaceDir')}- control={- <code className="font-mono text-xs text-content-muted break-all">- {existing.workspaceDir}- </code>- }- />- )}- {existing?.skillsDir && (- <SettingsRow- label={t('settings.profiles.editor.skillsDir')}- description={t('settings.profiles.editor.skillsDirHint')}- stacked- control={- <code className="font-mono text-xs text-content-muted break-all">- {existing.skillsDir}- </code>- }- />- )}- </SettingsSection>-- {/* Capabilities */}- <SettingsSection>- <AllowlistField- label={t('settings.profiles.editor.connectors')}- hint={t('settings.profiles.editor.connectorsHint')}- value={composioIntegrations}- onChange={setComposioIntegrations}- />- <AllowlistField- label={t('settings.profiles.editor.skills')}- hint={t('settings.profiles.editor.skillsHint')}- value={allowedSkills}- onChange={setAllowedSkills}- />- <AllowlistField- label={t('settings.profiles.editor.mcpServers')}- hint={t('settings.profiles.editor.mcpServersHint')}- value={allowedMcpServers}- onChange={setAllowedMcpServers}- />- </SettingsSection>-- {error && (- <Alert variant="destructive" className="text-xs">- {error}- </Alert>- )}-- <div className="flex justify-end gap-2 pt-1">- <Button type="button" variant="secondary" size="sm" onClick={backToList}>- {t('common.cancel')}- </Button>- <Button- type="button"- variant="primary"- size="sm"- onClick={() => void handleSubmit()}- disabled={!canSubmit}>- {submitting- ? t('settings.profiles.editor.saving')- : isCreate- ? t('common.create')- : t('common.save')}- </Button>- </div>- </div>- )}- </SettingsPanel>- );-};--/**- * "All / Selected" allowlist editor. `null` value = all (unrestricted); an- * array switches to restricted mode with a chip editor. Toggling back to All- * emits `null`; toggling to Selected emits the current array (or `[]`).- */-function AllowlistField({- label,- hint,- value,- onChange,-}: {- label: string;- hint: string;- value: Allowlist;- onChange: (next: Allowlist) => void;-}) {- const { t } = useT();- const [draft, setDraft] = useState('');- const restricted = value !== null;- const items = value ?? [];-- const commitDraft = () => {- const next = draft- .split(',')- .map(s => s.trim())- .filter(Boolean);- if (next.length === 0) return;- const merged = Array.from(new Set([...(value ?? []), ...next]));- onChange(merged);- setDraft('');- };-- return (- <SettingsRow- label={label}- description={hint}- stacked- control={- <div className="space-y-2">- <div className="inline-flex gap-1.5">- <Button- type="button"- variant={!restricted ? 'primary' : 'secondary'}- size="xs"- onClick={() => onChange(null)}>- {t('settings.profiles.editor.all')}- </Button>- <Button- type="button"- variant={restricted ? 'primary' : 'secondary'}- size="xs"- onClick={() => onChange(value ?? [])}>- {t('settings.profiles.editor.selected')}- </Button>- </div>-- {restricted && (- <div className="rounded-md border border-line p-2 dark:border-line-strong">- <div className="mb-1.5 flex flex-wrap gap-1.5">- {items.map(item => (- <span- key={item}- className="inline-flex items-center gap-1 rounded-full bg-surface-subtle px-2.5 py-1 font-mono text-xs text-content-secondary">- {item}- <Button- variant="tertiary"- size="xs"- iconOnly- aria-label={t('settings.profiles.editor.removeAria').replace('{item}', item)}- onClick={() => onChange(items.filter(x => x !== item))}- className="h-4 w-4 rounded-full p-0 text-content-faint hover:bg-transparent hover:text-coral-600 dark:hover:text-coral-300">- <LuX className="h-3 w-3" />- </Button>- </span>- ))}- </div>- <SettingsTextField- mono- value={draft}- onChange={e => setDraft(e.target.value)}- onKeyDown={e => {- if (e.key === 'Enter' || e.key === ',') {- e.preventDefault();- commitDraft();- }- }}- onBlur={commitDraft}- placeholder={t('settings.profiles.editor.addPlaceholder')}- aria-label={label}- />- </div>- )}- </div>- }- />- );-}--export default ProfileEditorPage;diff --git a/app/src/components/settings/panels/ProfilesPanel.test.tsx b/app/src/components/settings/panels/ProfilesPanel.test.tsxdeleted file mode 100644index 5973426c1f..0000000000--- a/app/src/components/settings/panels/ProfilesPanel.test.tsx+++ /dev/null@@ -1,132 +0,0 @@-import { configureStore } from '@reduxjs/toolkit';-import { fireEvent, render, screen, waitFor } from '@testing-library/react';-import { Provider } from 'react-redux';-import { MemoryRouter } from 'react-router-dom';-import { beforeEach, describe, expect, it, vi } from 'vitest';--import { agentProfilesApi } from '../../../services/api/agentProfilesApi';-import agentProfilesReducer from '../../../store/agentProfileSlice';-import type { AgentProfile, AgentProfilesResponse } from '../../../types/agentProfile';-import ProfilesPanel from './ProfilesPanel';--vi.mock('../../../services/api/agentProfilesApi', () => ({- agentProfilesApi: { list: vi.fn(), select: vi.fn(), upsert: vi.fn(), delete: vi.fn() },-}));--const mockNavigate = vi.fn();-vi.mock('react-router-dom', async importOriginal => {- const actual = await importOriginal<typeof import('react-router-dom')>();- return { ...actual, useNavigate: () => mockNavigate };-});--const mockList = vi.mocked(agentProfilesApi.list);-const mockSelect = vi.mocked(agentProfilesApi.select);-const mockDelete = vi.mocked(agentProfilesApi.delete);--function profile(overrides: Partial<AgentProfile> = {}): AgentProfile {- return {- id: 'research',- name: 'Research',- description: 'Source-grounded research.',- agentId: 'researcher',- builtIn: true,- ...overrides,- };-}--function response(profiles: AgentProfile[], activeProfileId: string): AgentProfilesResponse {- return { profiles, activeProfileId };-}--const PROFILES = [- profile({ id: 'default', name: 'Default', builtIn: true }),- profile({ id: 'research', name: 'Research', builtIn: true }),- profile({ id: 'writer', name: 'Writer', description: 'Drafts copy.', builtIn: false }),-];--function renderPanel() {- const store = configureStore({ reducer: { agentProfiles: agentProfilesReducer } });- return {- store,- ...render(- <Provider store={store}>- <MemoryRouter>- <ProfilesPanel />- </MemoryRouter>- </Provider>- ),- };-}--describe('ProfilesPanel', () => {- beforeEach(() => {- vi.clearAllMocks();- mockList.mockResolvedValue(response(PROFILES, 'default'));- });-- it('loads and lists profiles with active + source badges', async () => {- renderPanel();- expect(await screen.findByText('Writer')).toBeInTheDocument();- expect(screen.getByText('Research')).toBeInTheDocument();- // Active badge on the default profile, source badges on all.- expect(screen.getByText('Active')).toBeInTheDocument();- expect(screen.getAllByText('Built-in').length).toBeGreaterThan(0);- expect(screen.getByText('Custom')).toBeInTheDocument();- expect(mockList).toHaveBeenCalled();- });-- it('navigates to the create page from the New profile action', async () => {- renderPanel();- await screen.findByText('Writer');- fireEvent.click(screen.getByText('New profile'));- expect(mockNavigate).toHaveBeenCalledWith('/settings/profiles/new');- });-- it('sets a non-active profile as active', async () => {- mockSelect.mockResolvedValue(response(PROFILES, 'writer'));- renderPanel();- await screen.findByText('Writer');- // "Set as active" is shown for non-active profiles.- fireEvent.click(screen.getAllByText('Set as active')[0]);- await waitFor(() => expect(mockSelect).toHaveBeenCalled());- });-- it('navigates to the edit page for a profile', async () => {- renderPanel();- await screen.findByText('Writer');- fireEvent.click(screen.getAllByText('Edit')[0]);- expect(mockNavigate).toHaveBeenCalledWith(expect.stringContaining('/settings/profiles/edit/'));- });-- it('deletes a custom profile after confirmation', async () => {- mockDelete.mockResolvedValue(response(PROFILES.slice(0, 2), 'default'));- const confirmSpy = vi.spyOn(window, 'confirm').mockReturnValue(true);- renderPanel();- await screen.findByText('Writer');- // Only the custom profile (Writer) has a Delete button.- fireEvent.click(screen.getByText('Delete'));- await waitFor(() => expect(mockDelete).toHaveBeenCalledWith('writer'));- confirmSpy.mockRestore();- });-- it('does not delete when confirmation is cancelled', async () => {- const confirmSpy = vi.spyOn(window, 'confirm').mockReturnValue(false);- renderPanel();- await screen.findByText('Writer');- fireEvent.click(screen.getByText('Delete'));- expect(mockDelete).not.toHaveBeenCalled();- confirmSpy.mockRestore();- });-- it('renders the empty state when there are no profiles', async () => {- mockList.mockResolvedValue(response([], 'default'));- renderPanel();- expect(await screen.findByText('No agent profiles yet')).toBeInTheDocument();- });-- it('surfaces a load error', async () => {- mockList.mockRejectedValue(new Error('boom'));- renderPanel();- await waitFor(() => expect(screen.getByText(/boom/)).toBeInTheDocument());- });-});diff --git a/app/src/components/settings/panels/ProfilesPanel.tsx b/app/src/components/settings/panels/ProfilesPanel.tsxdeleted file mode 100644index 0a79edcd78..0000000000--- a/app/src/components/settings/panels/ProfilesPanel.tsx+++ /dev/null@@ -1,168 +0,0 @@-/**- * ProfilesPanel — Settings > Agent Profiles.- *- * Lists agent *profiles* ("flavours"): the active one, built-in defaults, and- * user-created profiles. Lets the user set the active profile, create a new- * one, edit, or delete a custom profile. The editor lives at- * `/settings/profiles/(new|edit/:id)` (`ProfileEditorPage`).- */-import { useCallback, useEffect, useState } from 'react';-import { LuPlus } from 'react-icons/lu';-import { useNavigate } from 'react-router-dom';--import { errorMessage } from '../../../lib/errorMessage';-import { useT } from '../../../lib/i18n/I18nContext';-import {- deleteAgentProfile,- loadAgentProfiles,- selectActiveAgentProfileId,- selectAgentProfile,- selectAgentProfiles,-} from '../../../store/agentProfileSlice';-import { useAppDispatch, useAppSelector } from '../../../store/hooks';-import Button from '../../ui/Button';-import { SettingsEmptyState, SettingsSection } from '../controls';-import SettingsPanel from '../layout/SettingsPanel';--const ProfilesPanel = () => {- const { t } = useT();- const navigate = useNavigate();- const dispatch = useAppDispatch();- const profiles = useAppSelector(selectAgentProfiles);- const activeId = useAppSelector(selectActiveAgentProfileId);- const status = useAppSelector(state => state.agentProfiles.status);- const error = useAppSelector(state => state.agentProfiles.error);- const [actionError, setActionError] = useState<string | null>(null);-- useEffect(() => {- void dispatch(loadAgentProfiles());- }, [dispatch]);-- const setActive = useCallback(- async (id: string) => {- setActionError(null);- try {- await dispatch(selectAgentProfile(id)).unwrap();- } catch (err) {- // See #5900: `.unwrap()` rejects with a SerializedError, so the old- // `instanceof` guard rendered "[object Object]" here.- setActionError(errorMessage(err, 'Failed to switch profile'));- }- },- [dispatch]- );-- const remove = useCallback(- async (id: string) => {- if (!window.confirm(t('settings.profiles.deleteConfirm'))) return;- setActionError(null);- try {- await dispatch(deleteAgentProfile(id)).unwrap();- } catch (err) {- setActionError(errorMessage(err, 'Failed to delete profile'));- }- },- [dispatch, t]- );-- return (- <SettingsPanel- description={t('settings.profiles.menuDesc')}- action={- <Button- type="button"- variant="primary"- size="sm"- onClick={() => navigate('/settings/profiles/new')}>- <LuPlus className="h-4 w-4" />- {t('settings.profiles.new')}- </Button>- }>- <>- <p className="text-sm text-content-muted">{t('settings.profiles.subtitle')}</p>-- {(actionError || error) && (- <p className="rounded-md border border-coral-200 bg-coral-50 px-3 py-2 text-xs text-coral-700 dark:border-coral-500/30 dark:bg-coral-500/10 dark:text-coral-300">- {actionError || `${t('settings.profiles.loadError')}: ${error}`}- </p>- )}-- {profiles.length === 0 ? (- status === 'loading' ? (- <div className="flex items-center justify-center py-12 text-content-faint">- <div className="mr-2 h-4 w-4 animate-spin rounded-full border-2 border-primary-500 border-t-transparent" />- <span className="text-sm">{t('common.loading')}</span>- </div>- ) : (- <SettingsEmptyState label={t('settings.profiles.empty')} />- )- ) : (- <SettingsSection>- <ul className="divide-y divide-line-subtle">- {profiles.map(profile => {- const isActive = profile.id === activeId;- return (- <li- key={profile.id}- className="flex items-center justify-between gap-3 px-4 py-3">- <div className="min-w-0">- <div className="flex items-center gap-2">- <span className="truncate text-sm font-semibold text-content">- {profile.name}- </span>- {isActive && (- <span className="rounded-full bg-sage-100 px-2 py-0.5 text-[10px] font-medium text-sage-700 dark:bg-sage-500/15 dark:text-sage-300">- {t('settings.profiles.active')}- </span>- )}- <span className="rounded-full bg-surface-subtle px-2 py-0.5 text-[10px] font-medium text-content-muted">- {profile.builtIn- ? t('settings.profiles.sourceBuiltIn')- : t('settings.profiles.sourceCustom')}- </span>- </div>- {profile.description && (- <p className="mt-0.5 truncate text-xs text-content-muted">- {profile.description}- </p>- )}- </div>- <div className="flex flex-none items-center gap-1.5">- {!isActive && (- <Button- type="button"- variant="secondary"- size="sm"- onClick={() => void setActive(profile.id)}>- {t('settings.profiles.setActive')}- </Button>- )}- <Button- type="button"- variant="secondary"- size="sm"- onClick={() => navigate(`/settings/profiles/edit/${profile.id}`)}>- {t('common.edit')}- </Button>- {!profile.builtIn && (- <Button- type="button"- variant="tertiary"- size="sm"- onClick={() => void remove(profile.id)}>- {t('common.delete')}- </Button>- )}- </div>- </li>- );- })}- </ul>- </SettingsSection>- )}- </>- </SettingsPanel>- );-};--export default ProfilesPanel;diff --git a/app/src/components/settings/panels/__tests__/ProfileEditorPage.payload.test.tsx b/app/src/components/settings/panels/__tests__/ProfileEditorPage.payload.test.tsxdeleted file mode 100644index fb428c2dc5..0000000000--- a/app/src/components/settings/panels/__tests__/ProfileEditorPage.payload.test.tsx+++ /dev/null@@ -1,329 +0,0 @@-/**- * ProfileEditorPage — the save payload, id stickiness, and the failure path.- *- * `ProfileEditorPage.test.tsx` (sibling) covers the happy path: slug derivation,- * hydration, not-found, the allowlist chips and the toggle rows. It stops at- * `expect(sent.id)` / `expect(sent.name)`, so the rest of the object- * `handleSubmit` builds is unasserted — and that object is what reaches the RPC- * layer. This file covers the normalisation in `handleSubmit`- * (`ProfileEditorPage.tsx:137-166`), the `idTouched` latch, and what happens- * when the upsert rejects.- *- * Deliberately a separate file rather than an edit to the sibling: three of us- * are working in this directory.- */-import { configureStore } from '@reduxjs/toolkit';-import { fireEvent, render, screen, waitFor } from '@testing-library/react';-import { Provider } from 'react-redux';-import { MemoryRouter, Route, Routes } from 'react-router-dom';-import { beforeEach, describe, expect, it, vi } from 'vitest';--import { agentProfilesApi } from '../../../../services/api/agentProfilesApi';-import agentProfilesReducer from '../../../../store/agentProfileSlice';-import type { AgentProfile } from '../../../../types/agentProfile';-import ProfileEditorPage from '../ProfileEditorPage';--vi.mock('../../../../services/api/agentProfilesApi', () => ({- agentProfilesApi: { list: vi.fn(), select: vi.fn(), upsert: vi.fn(), delete: vi.fn() },-}));--const mockNavigate = vi.fn();-vi.mock('react-router-dom', async importOriginal => {- const actual = await importOriginal<typeof import('react-router-dom')>();- return { ...actual, useNavigate: () => mockNavigate };-});--const mockUpsert = vi.mocked(agentProfilesApi.upsert);--function profile(overrides: Partial<AgentProfile> = {}): AgentProfile {- return {- id: 'writer',- name: 'Writer',- description: 'Drafts copy.',- agentId: 'orchestrator',- builtIn: false,- ...overrides,- };-}--function renderAt(path: string, profiles: AgentProfile[] = []) {- const store = configureStore({- reducer: { agentProfiles: agentProfilesReducer },- preloadedState: {- agentProfiles: { profiles, activeProfileId: 'default', status: 'idle' as const, error: null },- },- });- return render(- <Provider store={store}>- <MemoryRouter initialEntries={[path]}>- <Routes>- <Route path="/settings/profiles/new" element={<ProfileEditorPage />} />- <Route path="/settings/profiles/edit/:id" element={<ProfileEditorPage />} />- </Routes>- </MemoryRouter>- </Provider>- );-}--const nameField = () => screen.getByLabelText('Name');-const idField = () => screen.getByLabelText('ID') as HTMLInputElement;-const submit = (label: string) => screen.getByText(label).closest('button')!;--async function sentPayload() {- await waitFor(() => expect(mockUpsert).toHaveBeenCalled());- return mockUpsert.mock.calls[0][0];-}--describe('ProfileEditorPage — id stickiness', () => {- beforeEach(() => {- vi.clearAllMocks();- mockUpsert.mockResolvedValue({ profiles: [], activeProfileId: 'default' });- });-- // `handleName` re-slugs the id only while the user has not touched it- // (`ProfileEditorPage.tsx:125-128`). Without the latch, typing the rest of a- // name after choosing an id silently overwrites the chosen id.- it('stops re-slugging the id once the user edits it', () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'My Research' } });- expect(idField().value).toBe('my-research');-- fireEvent.change(idField(), { target: { value: 'custom-id' } });- fireEvent.change(nameField(), { target: { value: 'My Research Assistant' } });-- expect(idField().value).toBe('custom-id');- });-- it('keeps re-slugging while the id is untouched', () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'One' } });- expect(idField().value).toBe('one');- fireEvent.change(nameField(), { target: { value: 'One Two' } });- expect(idField().value).toBe('one-two');- });-- it('submits the typed id rather than the slug of the name', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'My Research' } });- fireEvent.change(idField(), { target: { value: ' custom-id ' } });- fireEvent.click(submit('Create'));-- expect((await sentPayload()).id).toBe('custom-id');- });-- it('falls back to the slug of the name when the id box is cleared', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'My Research' } });- fireEvent.change(idField(), { target: { value: '' } });- // The latch is set, so the id no longer tracks the name — but `resolvedId`- // still falls back to the slug rather than submitting an empty id.- fireEvent.click(submit('Create'));-- expect((await sentPayload()).id).toBe('my-research');- });-- it('does not offer an editable id in edit mode', () => {- renderAt('/settings/profiles/edit/writer', [profile()]);- expect(screen.queryByLabelText('ID')).not.toBeInTheDocument();- });-});--describe('ProfileEditorPage — save payload normalisation', () => {- beforeEach(() => {- vi.clearAllMocks();- mockUpsert.mockResolvedValue({ profiles: [], activeProfileId: 'default' });- });-- it('trims the name and description', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: ' Spaced Name ' } });- fireEvent.change(screen.getByLabelText('Description'), {- target: { value: ' padded description ' },- });- fireEvent.click(submit('Create'));-- const sent = await sentPayload();- expect(sent.name).toBe('Spaced Name');- expect(sent.description).toBe('padded description');- });-- // `name: name.trim() || id` — a whitespace-only name must not reach the RPC- // layer as an empty string; the id stands in for it.- it('falls back to the id when the name is only whitespace', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Temp' } });- fireEvent.change(idField(), { target: { value: 'kept-id' } });- fireEvent.change(nameField(), { target: { value: ' ' } });- fireEvent.click(submit('Create'));-- const sent = await sentPayload();- expect(sent.name).toBe('kept-id');- });-- it('sends null rather than an empty string for the optional text fields', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Blank Optionals' } });- fireEvent.click(submit('Create'));-- const sent = await sentPayload();- expect(sent.modelOverride).toBeNull();- expect(sent.systemPromptSuffix).toBeNull();- expect(sent.soulMd).toBeNull();- expect(sent.temperature).toBeNull();- });-- it('defaults a blank agent id to orchestrator', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Blank Agent' } });- const agent = screen.getByLabelText('Base agent');- fireEvent.change(agent, { target: { value: ' ' } });- fireEvent.click(submit('Create'));-- expect((await sentPayload()).agentId).toBe('orchestrator');- });-- it('parses a numeric temperature', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Warm' } });- fireEvent.change(screen.getByLabelText('Temperature'), { target: { value: '0.7' } });- fireEvent.click(submit('Create'));-- expect((await sentPayload()).temperature).toBe(0.7);- });-- // `Number('abc')` is NaN, and NaN would serialise as `null` in JSON anyway —- // but only after passing through the payload as NaN. The `Number.isFinite`- // guard (`ProfileEditorPage.tsx:154`) is what keeps a non-numeric entry from- // becoming a NaN temperature.- it.each(['abc', '--', 'Infinity'])(- 'sends null for a non-finite temperature entry %s',- async value => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Bad Temp' } });- fireEvent.change(screen.getByLabelText('Temperature'), { target: { value } });- fireEvent.click(submit('Create'));-- const sent = await sentPayload();- expect(sent.temperature).toBeNull();- expect(Number.isNaN(sent.temperature as unknown as number)).toBe(false);- }- );-- it('preserves builtIn when editing a built-in profile', async () => {- renderAt('/settings/profiles/edit/writer', [profile({ builtIn: true })]);-- fireEvent.change(nameField(), { target: { value: 'Renamed Builtin' } });- fireEvent.click(submit('Save'));-- const sent = await sentPayload();- expect(sent.builtIn).toBe(true);- expect(sent.id).toBe('writer');- });-- it('marks a newly created profile as not built-in', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Mine' } });- fireEvent.click(submit('Create'));-- expect((await sentPayload()).builtIn).toBe(false);- });-});--describe('ProfileEditorPage — failure path', () => {- beforeEach(() => {- vi.clearAllMocks();- mockUpsert.mockResolvedValue({ profiles: [], activeProfileId: 'default' });- });-- it('surfaces an alert, stays on the page, and re-enables the button', async () => {- mockUpsert.mockRejectedValueOnce(new Error('backend refused the profile'));- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Doomed' } });- const create = submit('Create');- fireEvent.click(create);-- expect(await screen.findByRole('alert')).toBeInTheDocument();- // Navigating away on a failed save would lose the user's unsaved form.- expect(mockNavigate).not.toHaveBeenCalled();- await waitFor(() => expect(create).not.toBeDisabled());- });-- // Was pinned as a known defect (#5900): the alert read "[object Object]"- // because `dispatch(thunk).unwrap()` rejects with Redux Toolkit's- // SerializedError — a plain object, not an `Error` — and the old- // `err instanceof Error ? err.message : String(err)` guard stringified it.- // Fixed by routing through `lib/errorMessage`; the assertion is inverted- // rather than deleted, so a regression re-surfaces here.- it('renders the failure message, not [object Object]', async () => {- mockUpsert.mockRejectedValueOnce(new Error('backend refused the profile'));- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Doomed' } });- fireEvent.click(submit('Create'));-- const alert = await screen.findByRole('alert');- expect(alert).toHaveTextContent('backend refused the profile');- expect(alert).not.toHaveTextContent('[object Object]');- });-- // The shape that actually reaches this catch in production: a thunk that- // threw is rethrown by `.unwrap()` as a SerializedError, never an `Error`.- it('renders the message from a SerializedError-shaped rejection', async () => {- mockUpsert.mockRejectedValueOnce({- name: 'Error',- message: 'profile id already taken',- stack: 'at …',- });- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Doomed' } });- fireEvent.click(submit('Create'));-- const alert = await screen.findByRole('alert');- expect(alert).toHaveTextContent('profile id already taken');- expect(alert).not.toHaveTextContent('[object Object]');- });-- it('clears a previous error when the next save succeeds', async () => {- mockUpsert.mockRejectedValueOnce(new Error('transient failure'));- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Retry' } });- fireEvent.click(submit('Create'));- expect(await screen.findByRole('alert')).toBeInTheDocument();-- fireEvent.click(submit('Create'));- await waitFor(() => expect(screen.queryByRole('alert')).not.toBeInTheDocument());- expect(mockNavigate).toHaveBeenCalledWith('/settings/profiles');- });-- it('navigates back to the list only after a successful save', async () => {- renderAt('/settings/profiles/new');-- fireEvent.change(nameField(), { target: { value: 'Fine' } });- expect(mockNavigate).not.toHaveBeenCalled();- fireEvent.click(submit('Create'));-- await waitFor(() => expect(mockNavigate).toHaveBeenCalledWith('/settings/profiles'));- });-- it('does not show not-found while the profile list is still empty', () => {- // `notFound` is only set once a list has arrived- // (`ProfileEditorPage.tsx:99-102`); flagging it during load would blame the- // user for a race.- renderAt('/settings/profiles/edit/missing', []);- expect(screen.queryByText(/not found/i)).not.toBeInTheDocument();- });-});diff --git a/app/src/components/settings/panels/__tests__/ProfilesPanel.actions.test.tsx b/app/src/components/settings/panels/__tests__/ProfilesPanel.actions.test.tsxdeleted file mode 100644index 07528ed2d7..0000000000--- a/app/src/components/settings/panels/__tests__/ProfilesPanel.actions.test.tsx+++ /dev/null@@ -1,208 +0,0 @@-/**- * ProfilesPanel — the action-error paths, and the built-in/active affordance- * rules.- *- * `ProfilesPanel.test.tsx` (sibling) covers the happy paths and the *load*- * error. Neither `setActive` nor `remove` has its failure branch exercised- * anywhere, which is how the `[object Object]` defect at `ProfilesPanel.tsx:46`- * and `:59` survived until #5900 fixed it. It also does- * not assert which buttons a built-in or already-active profile may show; those- * are the guards that stop a user deleting a built-in.- *- * Separate file rather than an edit to the sibling: three of us are in this- * directory.- */-import { configureStore } from '@reduxjs/toolkit';-import { fireEvent, render, screen, waitFor, within } from '@testing-library/react';-import { Provider } from 'react-redux';-import { MemoryRouter } from 'react-router-dom';-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';--import { agentProfilesApi } from '../../../../services/api/agentProfilesApi';-import agentProfilesReducer from '../../../../store/agentProfileSlice';-import type { AgentProfile, AgentProfilesResponse } from '../../../../types/agentProfile';-import ProfilesPanel from '../ProfilesPanel';--vi.mock('../../../../services/api/agentProfilesApi', () => ({- agentProfilesApi: { list: vi.fn(), select: vi.fn(), upsert: vi.fn(), delete: vi.fn() },-}));--const mockNavigate = vi.fn();-vi.mock('react-router-dom', async importOriginal => {- const actual = await importOriginal<typeof import('react-router-dom')>();- return { ...actual, useNavigate: () => mockNavigate };-});--const mockList = vi.mocked(agentProfilesApi.list);-const mockSelect = vi.mocked(agentProfilesApi.select);-const mockDelete = vi.mocked(agentProfilesApi.delete);--function profile(overrides: Partial<AgentProfile> = {}): AgentProfile {- return {- id: 'research',- name: 'Research',- description: 'Source-grounded research.',- agentId: 'researcher',- builtIn: true,- ...overrides,- };-}--function response(profiles: AgentProfile[], activeProfileId: string): AgentProfilesResponse {- return { profiles, activeProfileId };-}--const PROFILES = [- profile({ id: 'default', name: 'Default', builtIn: true }),- profile({ id: 'writer', name: 'Writer', description: 'Drafts copy.', builtIn: false }),-];--function renderPanel() {- const store = configureStore({ reducer: { agentProfiles: agentProfilesReducer } });- render(- <Provider store={store}>- <MemoryRouter>- <ProfilesPanel />- </MemoryRouter>- </Provider>- );- return store;-}--/** The <li> for a profile, addressed by its visible name. */-const row = (name: string) => screen.getByText(name).closest('li') as HTMLElement;--describe('ProfilesPanel — action failures', () => {- beforeEach(() => {- vi.clearAllMocks();- mockList.mockResolvedValue(response(PROFILES, 'default'));- });-- it('shows an error when activating a profile fails', async () => {- mockSelect.mockRejectedValueOnce(new Error('select blew up'));- renderPanel();-- await screen.findByText('Writer');- fireEvent.click(within(row('Writer')).getByText('Set as active'));-- await waitFor(() => expect(mockSelect).toHaveBeenCalledWith('writer'));- // The panel must say *something* — silence would leave the user believing- // the switch took effect.- expect(await screen.findByText('select blew up')).toBeInTheDocument();- });-- it('shows an error when deleting a profile fails', async () => {- const confirmSpy = vi.spyOn(window, 'confirm').mockReturnValue(true);- mockDelete.mockRejectedValueOnce(new Error('delete blew up'));- renderPanel();-- await screen.findByText('Writer');- fireEvent.click(within(row('Writer')).getByText('Delete'));-- await waitFor(() => expect(mockDelete).toHaveBeenCalledWith('writer'));- expect(await screen.findByText('delete blew up')).toBeInTheDocument();- confirmSpy.mockRestore();- });-- // Was pinned as a known defect (#5900): both handlers stringified Redux- // Toolkit's SerializedError — a plain object, not an `Error` — so- // `err instanceof Error ? err.message : String(err)` yielded- // "[object Object]" and the message never reached the user. Fixed by routing- // through `lib/errorMessage`; the assertions are inverted rather than- // deleted, so a regression re-surfaces here.- it('renders the select failure message, not [object Object]', async () => {- mockSelect.mockRejectedValueOnce(new Error('select blew up'));- renderPanel();-- await screen.findByText('Writer');- fireEvent.click(within(row('Writer')).getByText('Set as active'));-- expect(await screen.findByText('select blew up')).toBeInTheDocument();- expect(screen.queryByText('[object Object]')).not.toBeInTheDocument();- });-- // The production shape: `.unwrap()` rethrows a SerializedError, not an Error.- it('renders the message from a SerializedError-shaped rejection', async () => {- mockSelect.mockRejectedValueOnce({- name: 'Error',- message: 'profile is not selectable',- stack: 'at …',- });- renderPanel();-- await screen.findByText('Writer');- fireEvent.click(within(row('Writer')).getByText('Set as active'));-- expect(await screen.findByText('profile is not selectable')).toBeInTheDocument();- expect(screen.queryByText('[object Object]')).not.toBeInTheDocument();- });-- it('clears a previous action error when the next action succeeds', async () => {- mockSelect.mockRejectedValueOnce(new Error('first attempt fails'));- mockSelect.mockResolvedValueOnce(response(PROFILES, 'writer'));- renderPanel();-- await screen.findByText('Writer');- fireEvent.click(within(row('Writer')).getByText('Set as active'));- expect(await screen.findByText('first attempt fails')).toBeInTheDocument();-- fireEvent.click(within(row('Writer')).getByText('Set as active'));- await waitFor(() => expect(screen.queryByText('first attempt fails')).not.toBeInTheDocument());- });-- it('does not delete, and raises no error, when the confirm is dismissed', async () => {- const confirmSpy = vi.spyOn(window, 'confirm').mockReturnValue(false);- renderPanel();-- await screen.findByText('Writer');- fireEvent.click(within(row('Writer')).getByText('Delete'));-- expect(mockDelete).not.toHaveBeenCalled();- expect(screen.queryByRole('alert')).not.toBeInTheDocument();- confirmSpy.mockRestore();- });-});--describe('ProfilesPanel — affordance rules', () => {- beforeEach(() => {- vi.clearAllMocks();- mockList.mockResolvedValue(response(PROFILES, 'default'));- });-- afterEach(() => vi.restoreAllMocks());-- it('offers no Delete on a built-in profile', async () => {- renderPanel();- await screen.findByText('Default');-- // `Default` is builtIn; deleting a shipped profile must not be offered.- expect(within(row('Default')).queryByText('Delete')).not.toBeInTheDocument();- expect(within(row('Writer')).getByText('Delete')).toBeInTheDocument();- });-- it('offers no Set active on the profile that is already active', async () => {- renderPanel();- await screen.findByText('Default');-- expect(within(row('Default')).queryByText('Set as active')).not.toBeInTheDocument();- expect(within(row('Writer')).getByText('Set as active')).toBeInTheDocument();- });-- it('always offers Edit, on built-in and custom alike', async () => {- renderPanel();- await screen.findByText('Default');-- expect(within(row('Default')).getByText('Edit')).toBeInTheDocument();- expect(within(row('Writer')).getByText('Edit')).toBeInTheDocument();- });-- it('labels the active profile and the built-in/custom source', async () => {- renderPanel();- await screen.findByText('Default');-- expect(within(row('Default')).getByText('Active')).toBeInTheDocument();- expect(within(row('Writer')).queryByText('Active')).not.toBeInTheDocument();- expect(within(row('Default')).getByText('Built-in')).toBeInTheDocument();- expect(within(row('Writer')).getByText('Custom')).toBeInTheDocument();- });-});diff --git a/app/src/components/settings/panels/cron/CoreJobList.tsx b/app/src/components/settings/panels/cron/CoreJobList.tsxindex ebc764d6b2..6258058821 100644--- a/app/src/components/settings/panels/cron/CoreJobList.tsx+++ b/app/src/components/settings/panels/cron/CoreJobList.tsx@@ -1,5 +1,4 @@import { useT } from '../../../../lib/i18n/I18nContext';-import type { AgentProfile } from '../../../../types/agentProfile';import type { CoreCronJob, CoreCronRun } from '../../../../utils/tauriCommands';import Button from '../../../ui/Button';@@ -14,8 +13,6 @@ interface CoreJobListProps {onRemoveCoreJob: (jobId: string) => void;/** Optional: when provided, an Edit button is rendered per row. */onEditCoreJob?: (job: CoreCronJob) => void;- /** Agent profiles, used to resolve a job's attributed profile name. */- profiles?: AgentProfile[];}const CoreJobList = ({@@ -28,15 +25,9 @@ const CoreJobList = ({onLoadCoreRuns,onRemoveCoreJob,onEditCoreJob,- profiles = [],}: CoreJobListProps) => {const { t } = useT();- // Resolve a job's attributed profile to a display name, falling back to the- // raw id when the profile has since been deleted.- const profileLabel = (profileId: string): string =>- profiles.find(p => p.id === profileId)?.name || profileId;-const toggleButtonLabel = (job: CoreCronJob) => {if (coreBusyKey === `core-toggle:${job.id}`) {return t('settings.cron.jobs.saving');@@ -112,14 +103,6 @@ const CoreJobList = ({{new Date(job.next_run).toLocaleString()}</span></div>- {job.profile_id && (- <div data-testid={`cron-job-profile-${job.id}`}>- {t('settings.cron.jobs.profile')}{' '}- <span className="font-medium text-content-secondary">- {profileLabel(job.profile_id)}- </span>- </div>- )}{job.last_status && (<div>{t('settings.cron.jobs.lastStatus')}{' '}diff --git a/app/src/components/settings/panels/cron/CronJobFormModal.tsx b/app/src/components/settings/panels/cron/CronJobFormModal.tsxindex a354c0e576..ff6020e6cd 100644--- a/app/src/components/settings/panels/cron/CronJobFormModal.tsx+++ b/app/src/components/settings/panels/cron/CronJobFormModal.tsx@@ -10,7 +10,6 @@ import { useState } from 'react';import { cronToHuman } from '../../../../lib/cron/cronToHuman';import { SCHEDULE_PRESET_VALUES, SCHEDULE_PRESETS } from '../../../../lib/cron/schedulePresets';import { useT } from '../../../../lib/i18n/I18nContext';-import type { AgentProfile } from '../../../../types/agentProfile';import type {CoreCronJob,CoreCronSchedule,@@ -44,8 +43,6 @@ export interface CronJobFormModalProps {onClose: () => void;onCreate: (params: CronAddParams) => Promise<void>;onUpdate: (jobId: string, patch: Record<string, unknown>) => Promise<void>;- /** Agent profiles offered in the attribution picker (agent jobs only). */- profiles?: AgentProfile[];}// ── Helpers ────────────────────────────────────────────────────────────@@ -117,8 +114,6 @@ interface CronJobFormInitialState {sessionTarget: SessionTarget;delivery: DeliveryMode;deleteAfterRun: boolean;- /** '' means "no profile" / cleared attribution. */- profileId: string;}function getInitialFormState(mode: 'create' | 'edit', job?: CoreCronJob): CronJobFormInitialState {@@ -141,7 +136,6 @@ function getInitialFormState(mode: 'create' | 'edit', job?: CoreCronJob): CronJosessionTarget: job.session_target === 'main' ? 'main' : 'isolated',delivery: getInitialDelivery(job),deleteAfterRun: job.delete_after_run,- profileId: job.profile_id ?? '',};}@@ -158,7 +152,6 @@ function getInitialFormState(mode: 'create' | 'edit', job?: CoreCronJob): CronJosessionTarget: 'isolated',delivery: 'proactive',deleteAfterRun: false,- profileId: '',};}@@ -171,7 +164,6 @@ const CronJobFormModal = ({onClose,onCreate,onUpdate,- profiles = [],}: CronJobFormModalProps) => {const { t } = useT();const initialState = getInitialFormState(mode, job);@@ -190,7 +182,6 @@ const CronJobFormModal = ({const [sessionTarget, setSessionTarget] = useState<SessionTarget>(initialState.sessionTarget);const [delivery, setDelivery] = useState<DeliveryMode>(initialState.delivery);const [deleteAfterRun, setDeleteAfterRun] = useState(initialState.deleteAfterRun);- const [profileId, setProfileId] = useState(initialState.profileId);const [saving, setSaving] = useState(false);const [error, setError] = useState<string | null>(null);@@ -239,9 +230,6 @@ const CronJobFormModal = ({...(jobType === 'agent'? { delivery: { mode: delivery, best_effort: true } }: { delivery: { mode: 'none', best_effort: false } }),- // Attribute the run to an agent profile (agent jobs only). Omit the- // key entirely for "no profile" so the core leaves it unset.- ...(jobType === 'agent' && profileId ? { profile_id: profileId } : {}),delete_after_run: deleteAfterRun,};log('[CronJobFormModal] calling onCreate metadata=%o', {@@ -250,7 +238,6 @@ const CronJobFormModal = ({scheduleKind: params.schedule.kind,hasName: Boolean(params.name),hasSessionTarget: Boolean(params.session_target),- hasProfileAttribution: 'profile_id' in params,deleteAfterRun: params.delete_after_run,});await onCreate(params);@@ -265,9 +252,6 @@ const CronJobFormModal = ({...(jobType === 'agent'? { delivery: { mode: delivery, best_effort: true } }: { delivery: { mode: 'none', best_effort: false } }),- // Double-option attribution: send the id to (re)attribute, or `null`- // to clear. Only meaningful for agent jobs.- ...(jobType === 'agent' ? { profile_id: profileId || null } : {}),delete_after_run: deleteAfterRun,};const patchSchedule = patch.schedule as { kind?: string } | undefined;@@ -277,9 +261,6 @@ const CronJobFormModal = ({scheduleKind: patchSchedule?.kind ?? 'unknown',hasName: patch.name !== null,hasSessionTarget: 'session_target' in patch,- // Whether the patch (re)attributes a profile (truthy) vs clears/omits- // it (null/absent). Privacy-safe: boolean only, never the profile id.- hasProfileAttribution: Boolean(patch.profile_id),deleteAfterRun: patch.delete_after_run,});await onUpdate(job.id, patch);@@ -559,39 +540,6 @@ const CronJobFormModal = ({</div>)}- {/* Agent profile attribution (agent only) */}- {jobType === 'agent' && (- <div>- <label- htmlFor="cron-form-profile"- className="block text-xs font-medium text-content-secondary mb-1">- {t('settings.cron.jobs.formProfile')}- </label>- <NativeSelect- id="cron-form-profile"- data-testid="cron-form-profile"- value={profileId}- onChange={e => setProfileId(e.target.value)}- disabled={saving}- className="w-full">- <option value="">{t('settings.cron.jobs.formProfileNone')}</option>- {profiles.map(p => (- <option key={p.id} value={p.id}>- {p.name || p.id}- </option>- ))}- {profileId && !profiles.some(p => p.id === profileId) && (- // The attributed profile was deleted — keep it selectable so- // saving doesn't silently drop it, and surface the raw id.- <option value={profileId}>{profileId}</option>- )}- </NativeSelect>- <p className="text-xs text-content-muted mt-1">- {t('settings.cron.jobs.formProfileHint')}- </p>- </div>- )}-{/* Delivery mode (agent only) */}{jobType === 'agent' && (<div>diff --git a/app/src/components/settings/settingsRouteElements.tsx b/app/src/components/settings/settingsRouteElements.tsxindex d0b546b4cb..5202e44550 100644--- a/app/src/components/settings/settingsRouteElements.tsx+++ b/app/src/components/settings/settingsRouteElements.tsx@@ -25,8 +25,6 @@ import NotificationsPanel from './panels/NotificationsPanel';import PermissionsPanel from './panels/PermissionsPanel';import PersonalityPanel from './panels/PersonalityPanel';import PrivacyPanel from './panels/PrivacyPanel';-import ProfileEditorPage from './panels/ProfileEditorPage';-import ProfilesPanel from './panels/ProfilesPanel';import RecoveryPhrasePanel from './panels/RecoveryPhrasePanel';import SandboxSettingsPanel from './panels/SandboxSettingsPanel';import SecurityPanel from './panels/SecurityPanel';@@ -108,10 +106,6 @@ export function settingsRouteElements(): ReactNode {<Route path="agents" element={wrapSettingsPage(<AgentsPanel />)} /><Route path="agents/new" element={wrapSettingsPage(<AgentEditorPage />)} /><Route path="agents/edit/:id" element={wrapSettingsPage(<AgentEditorPage />)} />- {/* Top-level agent profiles (soul, memory, skills, MCP, connectors). */}- <Route path="profiles" element={wrapSettingsPage(<ProfilesPanel />)} />- <Route path="profiles/new" element={wrapSettingsPage(<ProfileEditorPage />)} />- <Route path="profiles/edit/:id" element={wrapSettingsPage(<ProfileEditorPage />)} /><Route path="agent-access" element={wrapSettingsPage(<AgentAccessPanel />)} /><Route path="activity-level" element={wrapSettingsPage(<AgentActivityPanel />)} /><Route path="sandbox-settings" element={wrapSettingsPage(<SandboxSettingsPanel />)} />diff --git a/app/src/components/settings/settingsRouteRegistry.ts b/app/src/components/settings/settingsRouteRegistry.tsindex 36a67b292e..36a5a84260 100644--- a/app/src/components/settings/settingsRouteRegistry.ts+++ b/app/src/components/settings/settingsRouteRegistry.ts@@ -360,28 +360,6 @@ export const SETTINGS_ROUTE_REGISTRY: SettingsRegistryEntry[] = [],},- // --- Agent profiles (top-level sidebar destination, Assistant group) ---- {- // profiles: top-level agent profiles (soul, memory, skills, MCP, connectors).- // Child routes profiles/new and profiles/edit/:id resolve to this entry.- id: 'profiles',- titleKey: 'settings.profiles.title',- descriptionKey: 'settings.profiles.menuDesc',- section: 'home',- searchKeywords: [- 'profile',- 'profiles',- 'agent',- 'soul',- 'memory',- 'skills',- 'mcp',- 'connectors',- ],- navGroup: 'assistant',- navOrder: 3,- },-// =========================================================================// AGENTS section leaf panels// =========================================================================diff --git a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx b/app/src/features/conversations/Conversations.processSourceCommand.test.tsxindex 1196eb788f..ded23257da 100644--- a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx+++ b/app/src/features/conversations/Conversations.processSourceCommand.test.tsx@@ -20,7 +20,6 @@ import { afterEach, describe, expect, it, vi } from 'vitest';import { SidebarSlotOutlet, SidebarSlotProvider } from '../../components/layout/shell/SidebarSlot';import { registry } from '../../lib/commands/registry';-import agentProfileReducer from '../../store/agentProfileSlice';import chatRuntimeReducer from '../../store/chatRuntimeSlice';import layoutReducer from '../../store/layoutSlice';import socketReducer from '../../store/socketSlice';@@ -158,7 +157,6 @@ function buildStore(preload: Record<string, unknown>) {layout: layoutReducer,socket: socketReducer,chatRuntime: chatRuntimeReducer,- agentProfiles: agentProfileReducer,theme: themeReducer,}),preloadedState: preload as never,diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsxindex 93e1297532..35bb8246c6 100644--- a/app/src/features/conversations/Conversations.tsx+++ b/app/src/features/conversations/Conversations.tsx@@ -65,12 +65,6 @@ import {useRustChat,} from '../../services/chatService';import { callCoreRpc } from '../../services/coreRpcClient';-import {- loadAgentProfiles,- selectActiveAgentProfileId,- selectAgentProfile,- selectAgentProfiles,-} from '../../store/agentProfileSlice';import {beginInferenceTurn,clearFollowupsForThread,@@ -398,8 +392,6 @@ const Conversations = ({[dispatch]);const socketStatus = useAppSelector(selectSocketStatus);- const agentProfiles = useAppSelector(selectAgentProfiles);- const selectedAgentProfileId = useAppSelector(selectActiveAgentProfileId);// Optional chain because narrow test stores (e.g. Conversations.test// bootstraps without the locale slice) shouldn't crash here. `'en'`// matches the no-locale-directive branch in the core, so legacy@@ -461,7 +453,7 @@ const Conversations = ({// Only `isAtLimit` is read here now: the near-limit and spent-budget// banners this file rendered are notices in `NoticeCenter`, which reads// the same hook once for the whole app.- } = useUsageState(selectedAgentProfileId === 'reasoning' ? 'reasoning' : 'chat');+ } = useUsageState('chat');const [deleteModal, setDeleteModal] = useState<ConfirmationModalType>({isOpen: false,title: '',@@ -496,12 +488,11 @@ const Conversations = ({let cancelled = false;(async () => {try {- const profile = agentProfiles.find(p => p.id === selectedAgentProfileId);- // Resolve the actually-selected profile's model so `modelSupportsVision`- // reflects the real tier, AND the vision workload so we know whether a+ // Resolve the standard chat model so `modelSupportsVision` reflects the+ // normal agent path, AND the vision workload so we know whether a// vision sub-agent can take the image. Documents are text-extracted so// any model handles them.- const hint = profile?.modelOverride ?? CHAT_MODEL_HINT;+ const hint = composerModelOverride ?? CHAT_MODEL_HINT;const [res, visionRes] = await Promise.all([callCoreRpc<{ model: string; vision?: boolean }>({method: 'openhuman.inference_resolve_model',@@ -528,12 +519,9 @@ const Conversations = ({return () => {cancelled = true;};- }, [agentProfiles, selectedAgentProfileId]);+ }, [composerModelOverride]);- // Display name for share cards (#5006): the active agent profile, or the- // product name when no named profile is selected.- const shareAgentName =- agentProfiles.find(p => p.id === selectedAgentProfileId)?.name ?? 'OpenHuman';+ const shareAgentName = 'OpenHuman';const textInputRef = useRef<HTMLTextAreaElement>(null);const composerFooterRef = useRef<HTMLDivElement>(null);@@ -644,14 +632,6 @@ const Conversations = ({);};- const handleSelectAgentProfile = async (profileId: string) => {- try {- await dispatch(selectAgentProfile(profileId)).unwrap();- } catch (error) {- debug('agent profile select failed: %o', error);- }- };-// Seed the composer footer with the selected thread's persisted token/cost// usage (read back from its session transcripts) so the totals reflect prior// turns instead of starting at zero. Best-effort; live turns accumulate on top@@ -765,14 +745,6 @@ const Conversations = ({}}, [selectedThreadId, dispatch]);- useEffect(() => {- void dispatch(loadAgentProfiles())- .unwrap()- .catch(error => {- debug('agent profiles load failed: %o', error);- });- }, [dispatch]);-useEffect(() => {const onDictationInsert = (event: Event) => {const customEvent = event as CustomEvent<{ text?: string; autoSend?: boolean }>;@@ -1110,10 +1082,7 @@ const Conversations = ({pendingSendsRef.current.add(sendingThreadId);addPendingSendingThread(sendingThreadId);const pendingAttachments = attachments.slice();- const modelOverride =- composerModelOverride ??- agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ??- CHAT_MODEL_HINT;+ const modelOverride = composerModelOverride ?? CHAT_MODEL_HINT;const messageText = buildMessageWithAttachments(trimmed, pendingAttachments);const userMessage: ThreadMessage = {id: `msg_${globalThis.crypto.randomUUID()}`,@@ -1187,7 +1156,6 @@ const Conversations = ({threadId: sendingThreadId,message: messageText,model: modelOverride,- profileId: selectedAgentProfileId,locale: uiLocale,});trackAnalyticsEvent('chat_message_sent', {@@ -1239,10 +1207,7 @@ const Conversations = ({if (!normalized && attachments.length === 0) return;const pendingAttachments = attachments.slice();- const modelOverride =- composerModelOverride ??- agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ??- CHAT_MODEL_HINT;+ const modelOverride = composerModelOverride ?? CHAT_MODEL_HINT;const messageText = buildMessageWithAttachments(normalized, pendingAttachments);const userMessage: ThreadMessage = {id: `msg_${globalThis.crypto.randomUUID()}`,@@ -1288,7 +1253,6 @@ const Conversations = ({threadId,message: messageText,model: modelOverride,- profileId: selectedAgentProfileId,locale: uiLocale,queueMode: 'parallel',});@@ -1321,10 +1285,7 @@ const Conversations = ({const pendingAttachments = attachments.slice();if (!normalized && pendingAttachments.length === 0) return;- const modelOverride =- composerModelOverride ??- agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ??- CHAT_MODEL_HINT;+ const modelOverride = composerModelOverride ?? CHAT_MODEL_HINT;const messageText = buildMessageWithAttachments(normalized, pendingAttachments);// Build the full user message exactly like a normal send (content +// attachment metadata) so the follow-up persists identically when it is@@ -1371,7 +1332,6 @@ const Conversations = ({threadId,message: messageText,model: modelOverride,- profileId: selectedAgentProfileId,locale: uiLocale,queueMode: 'followup',});@@ -2499,45 +2459,13 @@ const Conversations = ({{/* Thread title + inline rename moved to the sidebar thread list rows. */}- {/* Model + token stats (left) and the quick/reasoning toggle + files- chip (right) share one line. */}+ {/* Model/token stats and the supporting controls share one line. */}<divclassName="mt-2 flex items-center justify-between gap-2"data-walkthrough="chat-agent-panel"><ComposerTokenStats model={resolvedModel} threadId={selectedThreadId} />{!isSidebar && (<div className="flex shrink-0 items-center gap-2">- <div- className="flex h-7 items-center rounded-full border border-line bg-surface-subtle p-0.5"- role="radiogroup"- aria-label={t('chat.agentProfile.label')}>- <button- type="button"- role="radio"- aria-checked={selectedAgentProfileId === 'default'}- data-analytics-id="chat-header-mode-quick"- onClick={() => void handleSelectAgentProfile('default')}- className={`rounded-full px-2.5 py-0.5 text-xs font-medium transition-all ${- selectedAgentProfileId === 'default'- ? 'bg-surface text-content shadow-xs'- : 'text-content-muted hover:text-content-secondary'- }`}>- {t('chat.agentProfile.quick')}- </button>- <button- type="button"- role="radio"- aria-checked={selectedAgentProfileId === 'reasoning'}- data-analytics-id="chat-header-mode-reasoning"- onClick={() => void handleSelectAgentProfile('reasoning')}- className={`rounded-full px-2.5 py-0.5 text-xs font-medium transition-all ${- selectedAgentProfileId === 'reasoning'- ? 'bg-surface text-content shadow-xs'- : 'text-content-muted hover:text-content-secondary'- }`}>- {t('chat.agentProfile.reasoning')}- </button>- </div>{renderBackgroundProcessesButton(() =>threadViewRef.current?.openBackgroundProcesses())}diff --git a/app/src/lib/i18n/ar.ts b/app/src/lib/i18n/ar.tsindex 907617bbc2..90e98a92cc 100644--- a/app/src/lib/i18n/ar.ts+++ b/app/src/lib/i18n/ar.ts@@ -298,10 +298,6 @@ const messages: TranslationMap = {'nav.alerts': 'التنبيهات','nav.rewards': 'المكافآت','nav.settings': 'الإعدادات',- 'nav.agentProfiles': 'ملفات الوكلاء',- 'nav.switchAgentProfile': 'تبديل ملف الوكيل',- 'nav.defaultAgentProfile': 'الوكيل الافتراضي',- 'nav.noAgentProfiles': 'لم يتم العثور على ملفات وكلاء','nav.activity': 'النشاط','nav.brain': 'الدماغ','nav.flows': 'سير العمل',@@ -4570,11 +4566,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'معزول (موصى به)','settings.cron.jobs.formSessionMain': 'الجلسة الرئيسية','settings.cron.jobs.formSessionTarget': 'هدف الجلسة',- 'settings.cron.jobs.formProfile': 'ملف الوكيل',- 'settings.cron.jobs.formProfileNone': 'بدون ملف',- 'settings.cron.jobs.formProfileHint':'شغّل هذه المهمة بالملف المحدد، مستخدمًا روحه وذاكرته ومساحة عمله.',- 'settings.cron.jobs.profile': 'الملف','settings.cron.jobs.lastStatus': 'آخر حالة','settings.cron.jobs.loading': 'جارٍ تحميل مهام cron...','settings.cron.jobs.loadingRuns': 'جارٍ تحميل عمليات التشغيل',@@ -6241,7 +6233,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'وكلاء','orchestration.detail.childRefs': 'الوكلاء الفرعيون','orchestration.detail.synthesis': 'التركيب النهائي',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'ملفات الوكيل','settings.profiles.subtitle': 'وكلاء بطابع خاص: لكل منهم روحه وذاكرته وموصّلاته ومهاراته.','settings.profiles.menuDesc': 'أنشئ ملفات الوكيل وأدِرها',diff --git a/app/src/lib/i18n/bn.ts b/app/src/lib/i18n/bn.tsindex 9a31eccd90..68f95bec10 100644--- a/app/src/lib/i18n/bn.ts+++ b/app/src/lib/i18n/bn.ts@@ -310,10 +310,6 @@ const messages: TranslationMap = {'nav.alerts': 'সতর্কতা','nav.rewards': 'পুরস্কার','nav.settings': 'সেটিংস',- 'nav.agentProfiles': 'এজেন্ট প্রোফাইল',- 'nav.switchAgentProfile': 'এজেন্ট প্রোফাইল বদলান',- 'nav.defaultAgentProfile': 'ডিফল্ট এজেন্ট',- 'nav.noAgentProfiles': 'কোনো এজেন্ট প্রোফাইল পাওয়া যায়নি','nav.activity': 'কার্যকলাপ','nav.brain': 'ব্রেইন','nav.flows': 'ওয়ার্কফ্লো',@@ -4682,11 +4678,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'বিচ্ছিন্ন (প্রস্তাবিত)','settings.cron.jobs.formSessionMain': 'প্রধান সেশন','settings.cron.jobs.formSessionTarget': 'সেশন টার্গেট',- 'settings.cron.jobs.formProfile': 'এজেন্ট প্রোফাইল',- 'settings.cron.jobs.formProfileNone': 'কোনো প্রোফাইল নয়',- 'settings.cron.jobs.formProfileHint':'নির্বাচিত প্রোফাইল হিসেবে এই কাজটি চালান, তার পরিচয়, মেমরি ও ওয়ার্কস্পেস ব্যবহার করে।',- 'settings.cron.jobs.profile': 'প্রোফাইল','settings.cron.jobs.lastStatus': 'শেষ স্ট্যাটাস','settings.cron.jobs.loading': 'ক্রন জব লোড হচ্ছে...','settings.cron.jobs.loadingRuns': 'রান লোড হচ্ছে',@@ -6393,7 +6385,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'এজেন্ট','orchestration.detail.childRefs': 'চাইল্ড এজেন্ট','orchestration.detail.synthesis': 'চূড়ান্ত সংশ্লেষণ',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'এজেন্ট প্রোফাইল','settings.profiles.subtitle':'স্বতন্ত্র এজেন্ট: প্রতিটির নিজস্ব আত্মা, স্মৃতি, কানেক্টর ও দক্ষতা।',diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.tsindex 2aaa58471e..d4ed50bc37 100644--- a/app/src/lib/i18n/de.ts+++ b/app/src/lib/i18n/de.ts@@ -329,10 +329,6 @@ const messages: TranslationMap = {'nav.alerts': 'Benachrichtigungen','nav.rewards': 'Belohnungen','nav.settings': 'Einstellungen',- 'nav.agentProfiles': 'Agentenprofile',- 'nav.switchAgentProfile': 'Agentenprofil wechseln',- 'nav.defaultAgentProfile': 'Standardagent',- 'nav.noAgentProfiles': 'Keine Agentenprofile gefunden','nav.activity': 'Aktivität','nav.brain': 'Gehirn','nav.flows': 'Workflows',@@ -4811,11 +4807,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Isoliert (empfohlen)','settings.cron.jobs.formSessionMain': 'Hauptsitzung','settings.cron.jobs.formSessionTarget': 'Sitzungsziel',- 'settings.cron.jobs.formProfile': 'Agentenprofil',- 'settings.cron.jobs.formProfileNone': 'Kein Profil',- 'settings.cron.jobs.formProfileHint':'Diesen Auftrag als ausgewähltes Profil ausführen, mit dessen Seele, Gedächtnis und Arbeitsbereich.',- 'settings.cron.jobs.profile': 'Profil','settings.cron.jobs.lastStatus': 'Letzter Stand','settings.cron.jobs.loading': 'Cron-Jobs werden geladen...','settings.cron.jobs.loadingRuns': 'Ladeläufe',@@ -6570,7 +6562,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'Agenten','orchestration.detail.childRefs': 'Untergeordnete Agenten','orchestration.detail.synthesis': 'Endgültige Zusammenführung',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'Agentenprofile','settings.profiles.subtitle':'Agenten mit Charakter – jeder mit eigener Seele, Erinnerung, Konnektoren und Fähigkeiten.',diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.tsindex 3e792ab6dd..5abb50eeec 100644--- a/app/src/lib/i18n/en.ts+++ b/app/src/lib/i18n/en.ts@@ -19,10 +19,6 @@ const en: TranslationMap = {'nav.alerts': 'Alerts','nav.rewards': 'Rewards','nav.settings': 'Settings',- 'nav.agentProfiles': 'Agent profiles',- 'nav.switchAgentProfile': 'Switch agent profile',- 'nav.defaultAgentProfile': 'Default agent',- 'nav.noAgentProfiles': 'No agent profiles found','nav.activity': 'Activity','nav.brain': 'Brain','nav.flows': 'Workflows',@@ -5397,14 +5393,10 @@ const en: TranslationMap = {'settings.cron.jobs.formScheduleRequired': 'Schedule is required','settings.cron.jobs.formScheduleType': 'Schedule type','settings.cron.jobs.formSessionIsolated': 'Isolated (recommended)',- 'settings.cron.jobs.formProfile': 'Agent profile',- 'settings.cron.jobs.formProfileNone': 'No profile',- 'settings.cron.jobs.formProfileHint':'Run this job as the selected profile, using its soul, memory, and workspace.','settings.cron.jobs.formSessionMain': 'Main session','settings.cron.jobs.formSessionTarget': 'Session target','settings.cron.jobs.lastStatus': 'Last status',- 'settings.cron.jobs.profile': 'Profile','settings.cron.jobs.loading': 'Loading cron jobs...','settings.cron.jobs.loadingRuns': 'Loading runs…','settings.cron.jobs.nextRun': 'Next run',@@ -6678,8 +6670,6 @@ const en: TranslationMap = {'settings.agents.editor.create': 'Create agent','settings.agents.editor.saving': 'Saving…',- // ── Agent Profiles ───────────────────────────────────────────────────────- 'settings.profiles.title': 'Agent Profiles','settings.profiles.subtitle':'Flavoured agents: each with its own soul, memory, connectors, and skills.','settings.profiles.menuDesc': 'Create and manage agent profiles',diff --git a/app/src/lib/i18n/es.ts b/app/src/lib/i18n/es.tsindex 98ab6662a4..65bbc4ddc3 100644--- a/app/src/lib/i18n/es.ts+++ b/app/src/lib/i18n/es.ts@@ -318,10 +318,6 @@ const messages: TranslationMap = {'nav.alerts': 'Alertas','nav.rewards': 'Recompensas','nav.settings': 'Configuración',- 'nav.agentProfiles': 'Perfiles de agente',- 'nav.switchAgentProfile': 'Cambiar perfil de agente',- 'nav.defaultAgentProfile': 'Agente predeterminado',- 'nav.noAgentProfiles': 'No se encontraron perfiles de agente','nav.activity': 'Actividad','nav.brain': 'Cerebro','nav.flows': 'Flujos de trabajo',@@ -4765,11 +4761,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Aislada (recomendado)','settings.cron.jobs.formSessionMain': 'Sesión principal','settings.cron.jobs.formSessionTarget': 'Sesión de destino',- 'settings.cron.jobs.formProfile': 'Perfil del agente',- 'settings.cron.jobs.formProfileNone': 'Sin perfil',- 'settings.cron.jobs.formProfileHint':'Ejecuta esta tarea como el perfil seleccionado, usando su alma, memoria y espacio de trabajo.',- 'settings.cron.jobs.profile': 'Perfil','settings.cron.jobs.lastStatus': 'Último estado','settings.cron.jobs.loading': 'Cargando tareas cron...','settings.cron.jobs.loadingRuns': 'Cargando ejecuciones',@@ -6526,7 +6518,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'agentes','orchestration.detail.childRefs': 'Agentes secundarios','orchestration.detail.synthesis': 'Síntesis final',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'Perfiles de agente','settings.profiles.subtitle':'Agentes con personalidad: cada uno con su propia alma, memoria, conectores y habilidades.',diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.tsindex a845375ae9..6d52312a66 100644--- a/app/src/lib/i18n/fr.ts+++ b/app/src/lib/i18n/fr.ts@@ -326,10 +326,6 @@ const messages: TranslationMap = {'nav.alerts': 'Alertes','nav.rewards': 'Récompenses','nav.settings': 'Paramètres',- 'nav.agentProfiles': "Profils d'agent",- 'nav.switchAgentProfile': "Changer de profil d'agent",- 'nav.defaultAgentProfile': 'Agent par défaut',- 'nav.noAgentProfiles': "Aucun profil d'agent trouvé",'nav.activity': 'Activité','nav.brain': 'Cerveau','nav.flows': 'Workflows',@@ -4794,11 +4790,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Isolée (recommandé)','settings.cron.jobs.formSessionMain': 'Session principale','settings.cron.jobs.formSessionTarget': 'Session cible',- 'settings.cron.jobs.formProfile': "Profil de l'agent",- 'settings.cron.jobs.formProfileNone': 'Aucun profil',- 'settings.cron.jobs.formProfileHint':'Exécuter cette tâche avec le profil sélectionné, en utilisant son âme, sa mémoire et son espace de travail.',- 'settings.cron.jobs.profile': 'Profil','settings.cron.jobs.lastStatus': 'Dernier statut','settings.cron.jobs.loading': 'Chargement des tâches cron…','settings.cron.jobs.loadingRuns': 'Chargement des exécutions',@@ -6557,7 +6549,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'agents','orchestration.detail.childRefs': 'Agents enfants','orchestration.detail.synthesis': 'Synthèse finale',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': "Profils d'agent",'settings.profiles.subtitle':'Des agents avec du caractère: chacun avec sa propre âme, mémoire, connecteurs et compétences.',diff --git a/app/src/lib/i18n/hi.ts b/app/src/lib/i18n/hi.tsindex 494890d6cc..01caace6bc 100644--- a/app/src/lib/i18n/hi.ts+++ b/app/src/lib/i18n/hi.ts@@ -312,10 +312,6 @@ const messages: TranslationMap = {'nav.alerts': 'अलर्ट','nav.rewards': 'रिवॉर्ड','nav.settings': 'सेटिंग्स',- 'nav.agentProfiles': 'एजेंट प्रोफाइल',- 'nav.switchAgentProfile': 'एजेंट प्रोफाइल बदलें',- 'nav.defaultAgentProfile': 'डिफॉल्ट एजेंट',- 'nav.noAgentProfiles': 'कोई एजेंट प्रोफाइल नहीं मिला','nav.activity': 'गतिविधि','nav.brain': 'ब्रेन','nav.flows': 'वर्कफ़्लो',@@ -4683,11 +4679,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'पृथक (अनुशंसित)','settings.cron.jobs.formSessionMain': 'मुख्य सत्र','settings.cron.jobs.formSessionTarget': 'सत्र लक्ष्य',- 'settings.cron.jobs.formProfile': 'एजेंट प्रोफ़ाइल',- 'settings.cron.jobs.formProfileNone': 'कोई प्रोफ़ाइल नहीं',- 'settings.cron.jobs.formProfileHint':'इस कार्य को चयनित प्रोफ़ाइल के रूप में चलाएँ, उसकी पहचान, स्मृति और कार्यस्थान का उपयोग करते हुए।',- 'settings.cron.jobs.profile': 'प्रोफ़ाइल','settings.cron.jobs.lastStatus': 'आखिरी स्टेटस','settings.cron.jobs.loading': 'Cron jobs लोड हो रही हैं...','settings.cron.jobs.loadingRuns': 'रन लोड हो रहे हैं',@@ -6390,7 +6382,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'एजेंट','orchestration.detail.childRefs': 'चाइल्ड एजेंट','orchestration.detail.synthesis': 'अंतिम संश्लेषण',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'एजेंट प्रोफ़ाइल','settings.profiles.subtitle': 'विशिष्ट एजेंट: हर एक की अपनी आत्मा, स्मृति, कनेक्टर और कौशल।','settings.profiles.menuDesc': 'एजेंट प्रोफ़ाइल बनाएँ और प्रबंधित करें',diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.tsindex 57d34ff30c..20859d360c 100644--- a/app/src/lib/i18n/id.ts+++ b/app/src/lib/i18n/id.ts@@ -316,10 +316,6 @@ const messages: TranslationMap = {'nav.alerts': 'Peringatan','nav.rewards': 'Hadiah','nav.settings': 'Pengaturan',- 'nav.agentProfiles': 'Profil agen',- 'nav.switchAgentProfile': 'Ganti profil agen',- 'nav.defaultAgentProfile': 'Agen default',- 'nav.noAgentProfiles': 'Profil agen tidak ditemukan','nav.activity': 'Aktivitas','nav.brain': 'Otak','nav.flows': 'Alur Kerja',@@ -4707,11 +4703,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Terisolasi (disarankan)','settings.cron.jobs.formSessionMain': 'Sesi utama','settings.cron.jobs.formSessionTarget': 'Target sesi',- 'settings.cron.jobs.formProfile': 'Profil agen',- 'settings.cron.jobs.formProfileNone': 'Tanpa profil',- 'settings.cron.jobs.formProfileHint':'Jalankan tugas ini sebagai profil yang dipilih, menggunakan jiwa, memori, dan ruang kerjanya.',- 'settings.cron.jobs.profile': 'Profil','settings.cron.jobs.lastStatus': 'Status terakhir','settings.cron.jobs.loading': 'Memuat cron job...','settings.cron.jobs.loadingRuns': 'Memuat run',@@ -6426,7 +6418,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'agen','orchestration.detail.childRefs': 'Agen anak','orchestration.detail.synthesis': 'Sintesis akhir',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'Profil Agen','settings.profiles.subtitle':'Agen dengan kepribadian: masing-masing dengan jiwa, memori, konektor, dan keterampilannya sendiri.',diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.tsindex 0ad73db0d3..f1a8bd5c19 100644--- a/app/src/lib/i18n/it.ts+++ b/app/src/lib/i18n/it.ts@@ -319,10 +319,6 @@ const messages: TranslationMap = {'nav.alerts': 'Avvisi','nav.rewards': 'Premi','nav.settings': 'Impostazioni',- 'nav.agentProfiles': 'Profili agente',- 'nav.switchAgentProfile': 'Cambia profilo agente',- 'nav.defaultAgentProfile': 'Agente predefinito',- 'nav.noAgentProfiles': 'Nessun profilo agente trovato','nav.activity': 'Attività','nav.brain': 'Cervello','nav.flows': 'Flussi di lavoro',@@ -4754,11 +4750,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Isolata (consigliata)','settings.cron.jobs.formSessionMain': 'Sessione principale','settings.cron.jobs.formSessionTarget': 'Sessione di destinazione',- 'settings.cron.jobs.formProfile': "Profilo dell'agente",- 'settings.cron.jobs.formProfileNone': 'Nessun profilo',- 'settings.cron.jobs.formProfileHint':'Esegui questo lavoro come il profilo selezionato, usando la sua anima, memoria e spazio di lavoro.',- 'settings.cron.jobs.profile': 'Profilo','settings.cron.jobs.lastStatus': 'Ultimo stato','settings.cron.jobs.loading': 'Caricamento cron job...','settings.cron.jobs.loadingRuns': 'Caricamento esecuzioni',@@ -6508,7 +6500,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'agenti','orchestration.detail.childRefs': 'Agenti figli','orchestration.detail.synthesis': 'Sintesi finale',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'Profili agente','settings.profiles.subtitle':'Agenti con carattere: ognuno con la propria anima, memoria, connettori e competenze.',diff --git a/app/src/lib/i18n/ko.ts b/app/src/lib/i18n/ko.tsindex 8f456265af..033b4789a3 100644--- a/app/src/lib/i18n/ko.ts+++ b/app/src/lib/i18n/ko.ts@@ -306,10 +306,6 @@ const messages: TranslationMap = {'nav.alerts': '알림','nav.rewards': '보상','nav.settings': '설정',- 'nav.agentProfiles': '에이전트 프로필',- 'nav.switchAgentProfile': '에이전트 프로필 전환',- 'nav.defaultAgentProfile': '기본 에이전트',- 'nav.noAgentProfiles': '에이전트 프로필을 찾을 수 없습니다','nav.activity': '활동','nav.brain': '브레인','nav.flows': '워크플로',@@ -4628,11 +4624,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': '격리됨 (권장)','settings.cron.jobs.formSessionMain': '메인 세션','settings.cron.jobs.formSessionTarget': '세션 대상',- 'settings.cron.jobs.formProfile': '에이전트 프로필',- 'settings.cron.jobs.formProfileNone': '프로필 없음',- 'settings.cron.jobs.formProfileHint':'선택한 프로필로 이 작업을 실행하며, 해당 프로필의 정체성, 메모리, 작업 공간을 사용합니다.',- 'settings.cron.jobs.profile': '프로필','settings.cron.jobs.lastStatus': '마지막 상태','settings.cron.jobs.loading': 'cron 작업 불러오는 중...','settings.cron.jobs.loadingRuns': '실행 기록 불러오는 중',@@ -6317,7 +6309,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': '에이전트','orchestration.detail.childRefs': '하위 에이전트','orchestration.detail.synthesis': '최종 종합',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': '에이전트 프로필','settings.profiles.subtitle':'개성 있는 에이전트: 각자 고유한 영혼, 기억, 커넥터, 기술을 갖습니다.',diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.tsindex 61f381e7e8..44e4b78cc1 100644--- a/app/src/lib/i18n/pl.ts+++ b/app/src/lib/i18n/pl.ts@@ -320,10 +320,6 @@ const messages: TranslationMap = {'nav.alerts': 'Alerty','nav.rewards': 'Nagrody','nav.settings': 'Ustawienia',- 'nav.agentProfiles': 'Profile agentów',- 'nav.switchAgentProfile': 'Przełącz profil agenta',- 'nav.defaultAgentProfile': 'Domyślny agent',- 'nav.noAgentProfiles': 'Nie znaleziono profili agentów','nav.activity': 'Aktywność','nav.brain': 'Mózg','nav.flows': 'Przepływy pracy',@@ -4756,11 +4752,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Izolowana (zalecane)','settings.cron.jobs.formSessionMain': 'Sesja główna','settings.cron.jobs.formSessionTarget': 'Docelowa sesja',- 'settings.cron.jobs.formProfile': 'Profil agenta',- 'settings.cron.jobs.formProfileNone': 'Brak profilu',- 'settings.cron.jobs.formProfileHint':'Uruchom to zadanie jako wybrany profil, korzystając z jego duszy, pamięci i przestrzeni roboczej.',- 'settings.cron.jobs.profile': 'Profil','settings.cron.jobs.lastStatus': 'Ostatni status','settings.cron.jobs.loading': 'Wczytywanie zadań cron...','settings.cron.jobs.loadingRuns': 'Wczytywanie uruchomień',@@ -6487,7 +6479,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'agenci','orchestration.detail.childRefs': 'Agenci podrzędni','orchestration.detail.synthesis': 'Synteza końcowa',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'Profile agenta','settings.profiles.subtitle':'Agenci z charakterem: każdy z własną duszą, pamięcią, łącznikami i umiejętnościami.',diff --git a/app/src/lib/i18n/pt.ts b/app/src/lib/i18n/pt.tsindex 118437f5e8..c8537e019f 100644--- a/app/src/lib/i18n/pt.ts+++ b/app/src/lib/i18n/pt.ts@@ -314,10 +314,6 @@ const messages: TranslationMap = {'nav.alerts': 'Alertas','nav.rewards': 'Recompensas','nav.settings': 'Configurações',- 'nav.agentProfiles': 'Perfis de agente',- 'nav.switchAgentProfile': 'Trocar perfil de agente',- 'nav.defaultAgentProfile': 'Agente padrão',- 'nav.noAgentProfiles': 'Nenhum perfil de agente encontrado','nav.activity': 'Atividade','nav.brain': 'Cérebro','nav.flows': 'Fluxos de trabalho',@@ -4751,11 +4747,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Isolada (recomendada)','settings.cron.jobs.formSessionMain': 'Sessão principal','settings.cron.jobs.formSessionTarget': 'Sessão de destino',- 'settings.cron.jobs.formProfile': 'Perfil do agente',- 'settings.cron.jobs.formProfileNone': 'Sem perfil',- 'settings.cron.jobs.formProfileHint':'Execute esta tarefa como o perfil selecionado, usando sua alma, memória e espaço de trabalho.',- 'settings.cron.jobs.profile': 'Perfil','settings.cron.jobs.lastStatus': 'Último status','settings.cron.jobs.loading': 'Carregando tarefas cron...','settings.cron.jobs.loadingRuns': 'Carregando execuções',@@ -6497,7 +6489,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'agentes','orchestration.detail.childRefs': 'Agentes filhos','orchestration.detail.synthesis': 'Síntese final',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'Perfis de agente','settings.profiles.subtitle':'Agentes com personalidade: cada um com sua própria alma, memória, conectores e habilidades.',diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.tsindex 4fca330f6b..92eed744db 100644--- a/app/src/lib/i18n/ru.ts+++ b/app/src/lib/i18n/ru.ts@@ -316,10 +316,6 @@ const messages: TranslationMap = {'nav.alerts': 'Оповещения','nav.rewards': 'Награды','nav.settings': 'Настройки',- 'nav.agentProfiles': 'Профили агентов',- 'nav.switchAgentProfile': 'Сменить профиль агента',- 'nav.defaultAgentProfile': 'Агент по умолчанию',- 'nav.noAgentProfiles': 'Профили агентов не найдены','nav.activity': 'Активность','nav.brain': 'Мозг','nav.flows': 'Рабочие процессы',@@ -4729,11 +4725,7 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': 'Изолированная (рекомендуется)','settings.cron.jobs.formSessionMain': 'Основная сессия','settings.cron.jobs.formSessionTarget': 'Целевая сессия',- 'settings.cron.jobs.formProfile': 'Профиль агента',- 'settings.cron.jobs.formProfileNone': 'Без профиля',- 'settings.cron.jobs.formProfileHint':'Запускать эту задачу от выбранного профиля, используя его душу, память и рабочее пространство.',- 'settings.cron.jobs.profile': 'Профиль','settings.cron.jobs.lastStatus': 'Последний статус','settings.cron.jobs.loading': 'Загрузка заданий...','settings.cron.jobs.loadingRuns': 'Загрузка запусков',@@ -6462,7 +6454,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': 'агенты','orchestration.detail.childRefs': 'Дочерние агенты','orchestration.detail.synthesis': 'Итоговый синтез',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': 'Профили агента','settings.profiles.subtitle':'Агенты с характером: у каждого своя душа, память, коннекторы и навыки.',diff --git a/app/src/lib/i18n/zh-CN.ts b/app/src/lib/i18n/zh-CN.tsindex 162acae9e3..6df016aa77 100644--- a/app/src/lib/i18n/zh-CN.ts+++ b/app/src/lib/i18n/zh-CN.ts@@ -283,10 +283,6 @@ const messages: TranslationMap = {'nav.alerts': '通知','nav.rewards': '奖励','nav.settings': '设置',- 'nav.agentProfiles': '代理档案',- 'nav.switchAgentProfile': '切换代理档案',- 'nav.defaultAgentProfile': '默认代理',- 'nav.noAgentProfiles': '未找到代理档案','nav.activity': '动态','nav.brain': '大脑','nav.flows': '工作流',@@ -4418,10 +4414,6 @@ const messages: TranslationMap = {'settings.cron.jobs.formSessionIsolated': '隔离(推荐)','settings.cron.jobs.formSessionMain': '主会话','settings.cron.jobs.formSessionTarget': '会话目标',- 'settings.cron.jobs.formProfile': '智能体配置',- 'settings.cron.jobs.formProfileNone': '不使用配置',- 'settings.cron.jobs.formProfileHint': '以所选配置运行此任务,使用其灵魂、记忆和工作空间。',- 'settings.cron.jobs.profile': '配置','settings.cron.jobs.lastStatus': '上次状态','settings.cron.jobs.loading': '正在加载定时任务...','settings.cron.jobs.loadingRuns': '加载运行记录中',@@ -6032,7 +6024,6 @@ const messages: TranslationMap = {'orchestration.detail.agents': '个智能体','orchestration.detail.childRefs': '子智能体','orchestration.detail.synthesis': '最终综合',- // ── Agent Profiles ───────────────────────────────────────────────────────'settings.profiles.title': '智能体配置','settings.profiles.subtitle': '风格化智能体:每个都有自己的灵魂、记忆、连接器和技能。','settings.profiles.menuDesc': '创建并管理智能体配置',diff --git a/app/src/pages/__tests__/Conversations.attachments.test.tsx b/app/src/pages/__tests__/Conversations.attachments.test.tsxindex 66c2aafec0..87b6c04553 100644--- a/app/src/pages/__tests__/Conversations.attachments.test.tsx+++ b/app/src/pages/__tests__/Conversations.attachments.test.tsx@@ -11,7 +11,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { SidebarSlotOutlet, SidebarSlotProvider } from '../../components/layout/shell/SidebarSlot';import { ATTACHMENT_MAX_IMAGES } from '../../lib/attachments';-import agentProfileReducer from '../../store/agentProfileSlice';import chatRuntimeReducer from '../../store/chatRuntimeSlice';import socketReducer from '../../store/socketSlice';import threadReducer from '../../store/threadSlice';@@ -191,7 +190,6 @@ function buildStore(preload: Record<string, unknown> = {}) {thread: threadReducer,socket: socketReducer,chatRuntime: chatRuntimeReducer,- agentProfiles: agentProfileReducer,}),preloadedState: preload as never,});diff --git a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsxindex ea53028c78..dfbfc139dd 100644--- a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx+++ b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx@@ -28,7 +28,6 @@ import { SidebarSlotOutlet, SidebarSlotProvider } from '../../components/layout/// Type-only: erased at runtime, so it does not defeat `vi.hoisted`.import type { FlowApprovalRequest } from '../../hooks/useFlowApprovalRequests';import { chatSend } from '../../services/chatService';-import agentProfileReducer from '../../store/agentProfileSlice';import chatRuntimeReducer, {type ArtifactSnapshot,setToolTimelineForThread,@@ -194,7 +193,6 @@ function buildStore(preload: Record<string, unknown> = {}) {layout: layoutReducer,socket: socketReducer,chatRuntime: chatRuntimeReducer,- agentProfiles: agentProfileReducer,theme: themeReducer,}),preloadedState: preload as never,diff --git a/app/src/pages/__tests__/Conversations.render.test.tsx b/app/src/pages/__tests__/Conversations.render.test.tsxindex ec31a4d452..3526733134 100644--- a/app/src/pages/__tests__/Conversations.render.test.tsx+++ b/app/src/pages/__tests__/Conversations.render.test.tsx@@ -17,7 +17,6 @@ import { SidebarSlotOutlet, SidebarSlotProvider } from '../../components/layout/import { threadApi } from '../../services/api/threadApi';import { chatCancel, chatClearQueue, chatSend } from '../../services/chatService';import { CoreRpcError } from '../../services/coreRpcClient';-import agentProfileReducer from '../../store/agentProfileSlice';import chatRuntimeReducer, {beginInferenceTurn,bumpInferenceHeartbeatForThread,@@ -193,7 +192,6 @@ function buildStore(preload: Record<string, unknown> = {}) {layout: layoutReducer,socket: socketReducer,chatRuntime: chatRuntimeReducer,- agentProfiles: agentProfileReducer,theme: themeReducer,}),preloadedState: preload as never,diff --git a/app/src/pages/__tests__/Conversations.sidebarOverflow.test.tsx b/app/src/pages/__tests__/Conversations.sidebarOverflow.test.tsxindex ffd4716fdb..6466c954d1 100644--- a/app/src/pages/__tests__/Conversations.sidebarOverflow.test.tsx+++ b/app/src/pages/__tests__/Conversations.sidebarOverflow.test.tsx@@ -23,7 +23,6 @@ import { MemoryRouter } from 'react-router-dom';import { beforeEach, describe, expect, it, vi } from 'vitest';import { SidebarSlotOutlet, SidebarSlotProvider } from '../../components/layout/shell/SidebarSlot';-import agentProfileReducer from '../../store/agentProfileSlice';import chatRuntimeReducer from '../../store/chatRuntimeSlice';import layoutReducer from '../../store/layoutSlice';import socketReducer from '../../store/socketSlice';@@ -153,7 +152,6 @@ function buildStore(preload: Record<string, unknown> = {}) {layout: layoutReducer,socket: socketReducer,chatRuntime: chatRuntimeReducer,- agentProfiles: agentProfileReducer,theme: themeReducer,}),preloadedState: preload as never,diff --git a/app/src/providers/CoreStateProvider.tsx b/app/src/providers/CoreStateProvider.tsxindex dd656fff80..89f86eafa8 100644--- a/app/src/providers/CoreStateProvider.tsx+++ b/app/src/providers/CoreStateProvider.tsx@@ -30,7 +30,6 @@ import { daemonHealthService } from '../services/daemonHealthService';import { installShellSessionEventBridge } from '../services/session/shellSessionEvents';import { socketService } from '../services/socketService';import { store } from '../store';-import { loadAgentProfiles } from '../store/agentProfileSlice';import { resetUserScopedState } from '../store/resetActions';import { loadThreads, resetThreadCachesPreservingSelection } from '../store/threadSlice';import { getActiveUserId, setActiveUserId } from '../store/userScopedStorage';@@ -421,37 +420,6 @@ export default function CoreStateProvider({ children }: { children: ReactNode })});}- // Seed the active agent profile at the earliest safe moment, so the window- // in which a chat request could carry the stale 'default' id is as short as- // the snapshot allows (#5872). It is a narrowing, NOT a guarantee: this- // dispatch is deliberately not awaited, so a send issued before it resolves- // still reads 'default' from the slice. Closing that window for good means- // omitting `profileId` while the slice is still loading — the core keeps- // its own authoritative `active_profile_id` and resolves an absent id- // against it — which belongs in the send path, not here. Intentionally not- // gated on !isFlip: on Tauri a flip triggers restartApp() so the provider- // remounts with undefined previousIdentity and profiles load on the boot- // poll; on web restartApp() is a no-op and by the next poll- // previousIdentity === nextIdentity, making shouldClearScopedCaches false- // — so we must dispatch here while it is still true.- if (- requestId === snapshotRequestIdRef.current &&- shouldClearScopedCaches &&- nextIdentity &&- !isLogout- ) {- const profileReloadRequestId = requestId;- void store- .dispatch(loadAgentProfiles())- .unwrap()- .catch(err => {- if (profileReloadRequestId !== snapshotRequestIdRef.current) {- return;- }- log('post-identity agent profiles load failed: %O', sanitizeError(err));- });- }-if (nextIdentity && isLocalSession && seedUserId !== nextIdentity) {setActiveUserId(nextIdentity);}diff --git a/app/src/providers/__tests__/CoreStateProvider.test.tsx b/app/src/providers/__tests__/CoreStateProvider.test.tsxindex 2189eee58d..fa46723f5f 100644--- a/app/src/providers/__tests__/CoreStateProvider.test.tsx+++ b/app/src/providers/__tests__/CoreStateProvider.test.tsx@@ -2,7 +2,6 @@ import { act, render, screen, waitFor } from '@testing-library/react';import { useEffect } from 'react';import { beforeEach, describe, expect, it, vi } from 'vitest';-import * as agentProfilesModule from '../../services/api/agentProfilesApi';import * as coreStateApi from '../../services/coreStateApi';import * as tauriCommands from '../../utils/tauriCommands';import { __resetForTests as resetConfigRecoveryNotice } from '../../lib/configRecoveryNotice';@@ -18,9 +17,6 @@ import CoreStateProvider, {vi.mock('../../services/coreStateApi');vi.mock('../../services/analytics', () => ({ syncAnalyticsConsent: vi.fn() }));-vi.mock('../../services/api/agentProfilesApi', () => ({- agentProfilesApi: { list: vi.fn(), select: vi.fn(), upsert: vi.fn(), delete: vi.fn() },-}));type Snapshot = Awaited<ReturnType<typeof coreStateApi.fetchCoreAppSnapshot>>;@@ -124,15 +120,11 @@ describe('CoreStateProvider — identity-change cache clearing', () => {const getTeamMembers = vi.mocked(coreStateApi.getTeamMembers);const getTeamInvites = vi.mocked(coreStateApi.getTeamInvites);- const listProfiles = vi.mocked(agentProfilesModule.agentProfilesApi.list);-beforeEach(() => {fetchSnapshot.mockReset();listTeams.mockReset();getTeamMembers.mockReset();getTeamInvites.mockReset();- listProfiles.mockReset();- listProfiles.mockResolvedValue({ profiles: [], activeProfileId: 'default' } as never);resetCoreStateStore();setActiveUserId(null);});@@ -951,70 +943,6 @@ describe('CoreStateProvider — identity-change cache clearing', () => {expect(vi.mocked(tauriCommands.storeSession)).toHaveBeenCalled();});- // Regression for #5872: the active agent profile must be fetched from the- // backend immediately when identity is established so the first chat request- // carries the correct profileId rather than the 'default' initialState value.- it('dispatches loadAgentProfiles when identity is established (#5872)', async () => {- // Returning user: seed matches snapshot userId so isFlip = false.- // First snapshot transitions previousIdentity (null) → nextIdentity ('u1'),- // which sets shouldClearScopedCaches = true and fires the !isFlip block.- setActiveUserId('u1');- fetchSnapshot.mockResolvedValue(makeSnapshot({ userId: 'u1', sessionToken: 'tok1' }));- listTeams.mockResolvedValue([]);-- render(- <CoreStateProvider>- <Consumer />- </CoreStateProvider>- );-- await waitFor(() => expect(screen.getByTestId('ready').textContent).toBe('ready'));- // Flush micro-tasks so the void-dispatched promise chain completes.- await act(async () => {});-- expect(listProfiles).toHaveBeenCalled();- });-- // The isFlip = TRUE half, which is the whole reason the guard above omits- // `!isFlip` (the neighbouring loadThreads block does gate on it). Without- // this, a future refactor "tidying" `!isFlip` back in to match its neighbour- // would pass every test in this file and silently break the web path, where- // restartApp() is a no-op and the next poll has shouldClearScopedCaches- // false — so this dispatch would never fire again.- it('still dispatches loadAgentProfiles when the identity FLIPS (#5872)', async () => {- // u1 established first; `tok*` is not a local session token- // (isLocalSessionToken requires a 3-part `….local` shape), so the- // subsequent change to u2 gives seedUserId !== nextIdentity && !isLocalSession- // => isFlip === true.- setActiveUserId('u1');- fetchSnapshot.mockResolvedValue(makeSnapshot({ userId: 'u1', sessionToken: 'tok1' }));- listTeams.mockResolvedValue([]);-- let ctx: CoreStateContextValue | undefined;- render(- <CoreStateProvider>- <Consumer- captureCtx={next => {- ctx = next;- }}- />- </CoreStateProvider>- );- await waitFor(() => expect(screen.getByTestId('ready').textContent).toBe('ready'));- await act(async () => {});-- // Ignore the establish-time load; we are asserting on the flip itself.- listProfiles.mockClear();-- fetchSnapshot.mockResolvedValue(makeSnapshot({ userId: 'u2', sessionToken: 'tok2' }));- await act(async () => {- await ctx!.refresh();- });- await waitFor(() => expect(screen.getByTestId('user').textContent).toBe('u2'));- await act(async () => {});-- expect(listProfiles).toHaveBeenCalled();- });});describe('coreStatePollFailureWarningMessage', () => {diff --git a/app/src/services/api/agentProfilesApi.test.ts b/app/src/services/api/agentProfilesApi.test.tsdeleted file mode 100644index 29e70ba77d..0000000000--- a/app/src/services/api/agentProfilesApi.test.ts+++ /dev/null@@ -1,109 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const mockCallCoreRpc = vi.fn();--vi.mock('../coreRpcClient', () => ({- callCoreRpc: (...args: unknown[]) => mockCallCoreRpc(...args),-}));--describe('agentProfilesApi', () => {- beforeEach(() => {- mockCallCoreRpc.mockReset();- });-- it('lists and selects persistent agent profiles', async () => {- const response = {- profiles: [- {- id: 'default',- name: 'Default',- description: 'Default',- agentId: 'orchestrator',- builtIn: true,- },- ],- activeProfileId: 'default',- };- mockCallCoreRpc.mockResolvedValueOnce({ data: response });-- const { agentProfilesApi } = await import('./agentProfilesApi');- await expect(agentProfilesApi.list()).resolves.toEqual(response);- expect(mockCallCoreRpc).toHaveBeenCalledWith({ method: 'openhuman.profiles_list' });-- mockCallCoreRpc.mockResolvedValueOnce({ data: { ...response, activeProfileId: 'research' } });- await expect(agentProfilesApi.select('research')).resolves.toMatchObject({- activeProfileId: 'research',- });- expect(mockCallCoreRpc).toHaveBeenLastCalledWith({- method: 'openhuman.profiles_select',- params: { profile_id: 'research' },- });- });-- it('upserts and deletes profiles through core RPC', async () => {- const profile = {- id: 'custom',- name: 'Custom',- description: 'Custom profile',- agentId: 'orchestrator',- builtIn: false,- };- const response = { profiles: [profile], activeProfileId: 'custom' };-- mockCallCoreRpc.mockResolvedValueOnce({ data: response });-- const { agentProfilesApi } = await import('./agentProfilesApi');- await expect(agentProfilesApi.upsert(profile)).resolves.toEqual(response);- expect(mockCallCoreRpc).toHaveBeenCalledWith({- method: 'openhuman.profiles_upsert',- params: { profile },- });-- mockCallCoreRpc.mockResolvedValueOnce({ data: { profiles: [], activeProfileId: 'default' } });- await expect(agentProfilesApi.delete('custom')).resolves.toMatchObject({- activeProfileId: 'default',- });- expect(mockCallCoreRpc).toHaveBeenLastCalledWith({- method: 'openhuman.profiles_delete',- params: { profile_id: 'custom' },- });- });-- it('forwards dedicatedMemory/dedicatedWorkspace on upsert and round-trips the read-only resolved paths on list', async () => {- const profile = {- id: 'writer',- name: 'Writer',- description: 'Drafts copy.',- agentId: 'orchestrator',- builtIn: false,- dedicatedMemory: true,- dedicatedWorkspace: true,- };- const enriched = {- ...profile,- soulMdFile: '/workspace/personalities/writer/SOUL.md',- workspaceDir: '/action/profiles/writer',- };- const response = { profiles: [enriched], activeProfileId: 'writer' };-- mockCallCoreRpc.mockResolvedValueOnce({ data: response });- const { agentProfilesApi } = await import('./agentProfilesApi');- await expect(agentProfilesApi.upsert(profile)).resolves.toEqual(response);- expect(mockCallCoreRpc).toHaveBeenCalledWith({- method: 'openhuman.profiles_upsert',- params: { profile },- });-- mockCallCoreRpc.mockResolvedValueOnce({ data: response });- const listed = await agentProfilesApi.list();- expect(listed.profiles[0].soulMdFile).toBe('/workspace/personalities/writer/SOUL.md');- expect(listed.profiles[0].workspaceDir).toBe('/action/profiles/writer');- });-- it('rejects malformed envelopes with undefined data', async () => {- mockCallCoreRpc.mockResolvedValueOnce({ data: undefined });-- const { agentProfilesApi } = await import('./agentProfilesApi');- await expect(agentProfilesApi.list()).rejects.toThrow('RPC envelope contains undefined data');- });-});diff --git a/app/src/services/api/agentProfilesApi.ts b/app/src/services/api/agentProfilesApi.tsdeleted file mode 100644index 63f57920e6..0000000000--- a/app/src/services/api/agentProfilesApi.ts+++ /dev/null@@ -1,50 +0,0 @@-import type { AgentProfile, AgentProfilesResponse } from '../../types/agentProfile';-import { callCoreRpc } from '../coreRpcClient';--interface Envelope<T> {- data?: T;-}--function unwrapEnvelope<T>(response: Envelope<T> | T): T {- if (response && typeof response === 'object' && 'data' in response) {- const envelope = response as Envelope<T>;- if (envelope.data === undefined) {- throw new Error('RPC envelope contains undefined data');- }- return envelope.data;- }- return response as T;-}--export const agentProfilesApi = {- list: async (): Promise<AgentProfilesResponse> => {- const response = await callCoreRpc<Envelope<AgentProfilesResponse>>({- method: 'openhuman.profiles_list',- });- return unwrapEnvelope(response);- },-- select: async (profileId: string): Promise<AgentProfilesResponse> => {- const response = await callCoreRpc<Envelope<AgentProfilesResponse>>({- method: 'openhuman.profiles_select',- params: { profile_id: profileId },- });- return unwrapEnvelope(response);- },-- upsert: async (profile: AgentProfile): Promise<AgentProfilesResponse> => {- const response = await callCoreRpc<Envelope<AgentProfilesResponse>>({- method: 'openhuman.profiles_upsert',- params: { profile },- });- return unwrapEnvelope(response);- },-- delete: async (profileId: string): Promise<AgentProfilesResponse> => {- const response = await callCoreRpc<Envelope<AgentProfilesResponse>>({- method: 'openhuman.profiles_delete',- params: { profile_id: profileId },- });- return unwrapEnvelope(response);- },-};diff --git a/app/src/services/chatService.ts b/app/src/services/chatService.tsindex b54e72a038..a476d8b757 100644--- a/app/src/services/chatService.ts+++ b/app/src/services/chatService.ts@@ -1218,7 +1218,6 @@ interface ChatSendParams {threadId: string;message: string;model?: string;- profileId?: string | null;/*** BCP-47 UI locale (e.g. `'ar'`, `'zh-CN'`) — drives the core's* "reply in this language" system-prompt directive. Optional so@@ -1275,7 +1274,6 @@ export async function chatSend(params: ChatSendParams): Promise<string | undefinthread_id: params.threadId,message: params.message,model_override: params.model ?? undefined,- profile_id: params.profileId ?? undefined,locale: params.locale ?? undefined,speak_reply: params.speakReply ?? undefined,source: params.source ?? undefined,diff --git a/app/src/store/__tests__/agentProfileSlice.test.ts b/app/src/store/__tests__/agentProfileSlice.test.tsdeleted file mode 100644index 69725bc4a1..0000000000--- a/app/src/store/__tests__/agentProfileSlice.test.ts+++ /dev/null@@ -1,253 +0,0 @@-import { configureStore } from '@reduxjs/toolkit';-import { describe, expect, it, vi } from 'vitest';--import type { AgentProfilesResponse } from '../../types/agentProfile';-import reducer, {- type AgentProfileState,- deleteAgentProfile,- loadAgentProfiles,- selectActiveAgentProfile,- selectActiveAgentProfileId,- selectAgentProfile,- selectAgentProfiles,- setAgentProfilesFromResponse,- upsertAgentProfile,-} from '../agentProfileSlice';-import { resetUserScopedState } from '../resetActions';--const mockList = vi.fn();-const mockSelect = vi.fn();-const mockUpsert = vi.fn();-const mockDelete = vi.fn();--vi.mock('../../services/api/agentProfilesApi', () => ({- agentProfilesApi: {- list: (...args: unknown[]) => mockList(...args),- select: (...args: unknown[]) => mockSelect(...args),- upsert: (...args: unknown[]) => mockUpsert(...args),- delete: (...args: unknown[]) => mockDelete(...args),- },-}));--const twoProfiles: AgentProfilesResponse = {- activeProfileId: 'planner',- profiles: [- {- id: 'default',- name: 'Orchestrator',- description: 'Default',- agentId: 'orchestrator',- builtIn: true,- },- {- id: 'planner',- name: 'Planner',- description: 'Planning profile',- agentId: 'planner',- builtIn: true,- },- ],-};--function makeStore() {- return configureStore({ reducer: { agentProfiles: reducer } });-}--describe('agentProfileSlice', () => {- it('stores profiles and active profile from backend response', () => {- const state = reducer(undefined, setAgentProfilesFromResponse(twoProfiles));-- expect(state.activeProfileId).toBe('planner');- expect(state.profiles).toHaveLength(2);- expect(state.error).toBeNull();- });-- it('resets with other user-scoped state', () => {- const dirty = reducer(undefined, setAgentProfilesFromResponse(twoProfiles));- const reset = reducer(dirty, resetUserScopedState());-- expect(reset.activeProfileId).toBe('default');- expect(reset.profiles).toEqual([]);- expect(reset.status).toBe('idle');- });-- it('falls back to first profile id when activeProfileId is missing from response', () => {- const state = reducer(- undefined,- setAgentProfilesFromResponse({- activeProfileId: '',- profiles: [- {- id: 'research',- name: 'Research',- description: '',- agentId: 'researcher',- builtIn: true,- },- ],- })- );- expect(state.activeProfileId).toBe('research');- });-- it('falls back to "default" when profiles array is empty', () => {- const state = reducer(- undefined,- setAgentProfilesFromResponse({ activeProfileId: '', profiles: [] })- );- expect(state.activeProfileId).toBe('default');- });-});--describe('agentProfileSlice — async thunks', () => {- it('loadAgentProfiles: pending → loading, fulfilled → idle with profiles', async () => {- mockList.mockResolvedValueOnce(twoProfiles);- const store = makeStore();-- const promise = store.dispatch(loadAgentProfiles());- expect(store.getState().agentProfiles.status).toBe('loading');- expect(store.getState().agentProfiles.error).toBeNull();-- await promise;- const state = store.getState().agentProfiles;- expect(state.status).toBe('idle');- expect(state.profiles).toHaveLength(2);- expect(state.activeProfileId).toBe('planner');- expect(state.error).toBeNull();- });-- it('loadAgentProfiles: rejected → error with message', async () => {- mockList.mockRejectedValueOnce(new Error('network error'));- const store = makeStore();-- await store.dispatch(loadAgentProfiles());- const state = store.getState().agentProfiles;- expect(state.status).toBe('error');- expect(state.error).toContain('network error');- });-- it('selectAgentProfile: pending → saving, fulfilled → idle with updated active', async () => {- const updated: AgentProfilesResponse = { ...twoProfiles, activeProfileId: 'default' };- mockSelect.mockResolvedValueOnce(updated);- const store = makeStore();-- const promise = store.dispatch(selectAgentProfile('default'));- expect(store.getState().agentProfiles.status).toBe('saving');-- await promise;- const state = store.getState().agentProfiles;- expect(state.status).toBe('idle');- expect(state.activeProfileId).toBe('default');- });-- it('selectAgentProfile: rejected → error', async () => {- mockSelect.mockRejectedValueOnce(new Error('not found'));- const store = makeStore();-- await store.dispatch(selectAgentProfile('missing'));- const state = store.getState().agentProfiles;- expect(state.status).toBe('error');- expect(state.error).toContain('not found');- });-- it('upsertAgentProfile: pending → saving, fulfilled → idle', async () => {- const newProfile = {- id: 'custom',- name: 'Custom',- description: '',- agentId: 'orchestrator',- builtIn: false,- };- const withCustom: AgentProfilesResponse = {- activeProfileId: 'default',- profiles: [...twoProfiles.profiles, newProfile],- };- mockUpsert.mockResolvedValueOnce(withCustom);- const store = makeStore();-- const promise = store.dispatch(upsertAgentProfile(newProfile));- expect(store.getState().agentProfiles.status).toBe('saving');-- await promise;- const state = store.getState().agentProfiles;- expect(state.status).toBe('idle');- expect(state.profiles).toHaveLength(3);- expect(state.profiles.some(p => p.id === 'custom')).toBe(true);- });-- it('upsertAgentProfile: rejected → error', async () => {- mockUpsert.mockRejectedValueOnce(new Error('validation failed'));- const store = makeStore();-- await store.dispatch(- upsertAgentProfile({ id: 'x', name: '', description: '', agentId: '', builtIn: false })- );- expect(store.getState().agentProfiles.status).toBe('error');- expect(store.getState().agentProfiles.error).toContain('validation failed');- });-- it('deleteAgentProfile: pending → saving, fulfilled → idle with fewer profiles', async () => {- const afterDelete: AgentProfilesResponse = {- activeProfileId: 'default',- profiles: [twoProfiles.profiles[0]],- };- mockDelete.mockResolvedValueOnce(afterDelete);- const store = makeStore();-- const promise = store.dispatch(deleteAgentProfile('planner'));- expect(store.getState().agentProfiles.status).toBe('saving');-- await promise;- const state = store.getState().agentProfiles;- expect(state.status).toBe('idle');- expect(state.profiles).toHaveLength(1);- });-- it('deleteAgentProfile: rejected → error', async () => {- mockDelete.mockRejectedValueOnce(new Error('cannot delete built-in'));- const store = makeStore();-- await store.dispatch(deleteAgentProfile('default'));- const state = store.getState().agentProfiles;- expect(state.status).toBe('error');- expect(state.error).toContain('cannot delete built-in');- });-});--describe('agentProfileSlice — selectors', () => {- it('selectAgentProfiles extracts profiles array', () => {- const storeState = {- agentProfiles: {- profiles: twoProfiles.profiles,- activeProfileId: 'planner',- status: 'idle',- error: null,- } as AgentProfileState,- };- expect(selectAgentProfiles(storeState)).toHaveLength(2);- });-- it('selectActiveAgentProfileId extracts activeProfileId', () => {- const storeState = {- agentProfiles: {- profiles: [],- activeProfileId: 'research',- status: 'idle',- error: null,- } as AgentProfileState,- };- expect(selectActiveAgentProfileId(storeState)).toBe('research');- });-- it('selectActiveAgentProfile returns the active profile object', () => {- const storeState = {- agentProfiles: {- profiles: twoProfiles.profiles,- activeProfileId: 'planner',- status: 'idle',- error: null,- } as AgentProfileState,- };- expect(selectActiveAgentProfile(storeState)?.name).toBe('Planner');- });-});diff --git a/app/src/store/agentProfileSlice.ts b/app/src/store/agentProfileSlice.tsdeleted file mode 100644index b5ecf91137..0000000000--- a/app/src/store/agentProfileSlice.ts+++ /dev/null@@ -1,133 +0,0 @@-import { createAsyncThunk, createSlice, type PayloadAction } from '@reduxjs/toolkit';-import debug from 'debug';--import { agentProfilesApi } from '../services/api/agentProfilesApi';-import type { AgentProfile, AgentProfilesResponse } from '../types/agentProfile';-import { resetUserScopedState } from './resetActions';--const log = debug('agentProfiles');--export type AgentProfilesStatus = 'idle' | 'loading' | 'saving' | 'error';--export interface AgentProfileState {- profiles: AgentProfile[];- activeProfileId: string;- status: AgentProfilesStatus;- error: string | null;-}--const initialState: AgentProfileState = {- profiles: [],- activeProfileId: 'default',- status: 'idle',- error: null,-};--function errorMessage(error: unknown): string {- if (error instanceof Error) return error.message;- return String(error);-}--function applyProfileResponse(state: AgentProfileState, response: AgentProfilesResponse) {- state.profiles = response.profiles;- state.activeProfileId = response.activeProfileId || response.profiles[0]?.id || 'default';- state.error = null;-}--export const loadAgentProfiles = createAsyncThunk('agentProfiles/load', async () =>- agentProfilesApi.list()-);--export const selectAgentProfile = createAsyncThunk(- 'agentProfiles/select',- async (profileId: string) => agentProfilesApi.select(profileId)-);--export const upsertAgentProfile = createAsyncThunk(- 'agentProfiles/upsert',- async (profile: AgentProfile) => agentProfilesApi.upsert(profile)-);--export const deleteAgentProfile = createAsyncThunk(- 'agentProfiles/delete',- async (profileId: string) => agentProfilesApi.delete(profileId)-);--const agentProfileSlice = createSlice({- name: 'agentProfiles',- initialState,- reducers: {- setAgentProfilesFromResponse(state, action: PayloadAction<AgentProfilesResponse>) {- applyProfileResponse(state, action.payload);- state.status = 'idle';- },- },- extraReducers: builder => {- builder- .addCase(loadAgentProfiles.pending, state => {- state.status = 'loading';- state.error = null;- })- .addCase(loadAgentProfiles.fulfilled, (state, action) => {- applyProfileResponse(state, action.payload);- state.status = 'idle';- log('loaded %d profile(s), active=%s', state.profiles.length, state.activeProfileId);- })- .addCase(loadAgentProfiles.rejected, (state, action) => {- state.status = 'error';- state.error = errorMessage(action.error.message ?? action.error);- })- .addCase(selectAgentProfile.pending, state => {- state.status = 'saving';- state.error = null;- })- .addCase(selectAgentProfile.fulfilled, (state, action) => {- applyProfileResponse(state, action.payload);- state.status = 'idle';- })- .addCase(selectAgentProfile.rejected, (state, action) => {- state.status = 'error';- state.error = errorMessage(action.error.message ?? action.error);- })- .addCase(upsertAgentProfile.pending, state => {- state.status = 'saving';- state.error = null;- })- .addCase(upsertAgentProfile.fulfilled, (state, action) => {- applyProfileResponse(state, action.payload);- state.status = 'idle';- })- .addCase(upsertAgentProfile.rejected, (state, action) => {- state.status = 'error';- state.error = errorMessage(action.error.message ?? action.error);- })- .addCase(deleteAgentProfile.pending, state => {- state.status = 'saving';- state.error = null;- })- .addCase(deleteAgentProfile.fulfilled, (state, action) => {- applyProfileResponse(state, action.payload);- state.status = 'idle';- })- .addCase(deleteAgentProfile.rejected, (state, action) => {- state.status = 'error';- state.error = errorMessage(action.error.message ?? action.error);- })- .addCase(resetUserScopedState, () => initialState);- },-});--export const { setAgentProfilesFromResponse } = agentProfileSlice.actions;--export const selectAgentProfiles = (state: { agentProfiles: AgentProfileState }) =>- state.agentProfiles.profiles;--export const selectActiveAgentProfileId = (state: { agentProfiles: AgentProfileState }) =>- state.agentProfiles.activeProfileId;--export const selectActiveAgentProfile = (state: { agentProfiles: AgentProfileState }) =>- state.agentProfiles.profiles.find(- profile => profile.id === state.agentProfiles.activeProfileId- ) ?? null;--export default agentProfileSlice.reducer;diff --git a/app/src/store/index.ts b/app/src/store/index.tsindex 5bb550cb6d..c4c5866f7b 100644--- a/app/src/store/index.ts+++ b/app/src/store/index.ts@@ -15,7 +15,6 @@ import {import { E2E_RESTART_APP_AS_RELOAD, IS_DEV } from '../utils/config';import accountsReducer from './accountsSlice';-import agentProfileReducer from './agentProfileSlice';import announcementReducer from './announcementSlice';import {type ArtifactsByThread,@@ -249,7 +248,6 @@ export const store = configureStore({thread: persistedThreadReducer,layout: persistedLayoutReducer,chatRuntime: persistedChatRuntimeReducer,- agentProfiles: agentProfileReducer,channelConnections: persistedChannelConnectionsReducer,accounts: persistedAccountsReducer,notifications: persistedNotificationReducer,diff --git a/app/src/types/agentProfile.ts b/app/src/types/agentProfile.tsdeleted file mode 100644index 19679044cf..0000000000--- a/app/src/types/agentProfile.ts+++ /dev/null@@ -1,53 +0,0 @@-export interface AgentProfile {- id: string;- name: string;- description: string;- agentId: string;- modelOverride?: string | null;- temperature?: number | null;- systemPromptSuffix?: string | null;- allowedTools?: string[] | null;- builtIn: boolean;- avatarUrl?: string | null;- voiceId?: string | null;- soulMd?: string | null;- soulMdPath?: string | null;- /** Composio toolkit slugs this profile can use. null/undefined = all. */- composioIntegrations?: string[] | null;- /** Memory-source entry ids this profile recalls from. null/undefined = all. */- memorySources?: string[] | null;- /** Whether this profile recalls prior agent conversations. Default true. */- includeAgentConversations?: boolean;- /** Skill/workflow ids this profile can list and run. null/undefined = all. */- allowedSkills?: string[] | null;- /** MCP server names this profile can reach. null/undefined = all. */- allowedMcpServers?: string[] | null;- memoryDirSuffix?: string | null;- isMaster?: boolean | null;- sortOrder?: number | null;- /** Give this profile its own memory subtree instead of the shared one. Default false. */- dedicatedMemory?: boolean;- /** Give this profile its own working directory under action_dir. Default false. */- dedicatedWorkspace?: boolean;- /**- * Read-only, resolved by the core on read (never sent on upsert): absolute- * path of `personalities/<id>/SOUL.md` when it exists.- */- soulMdFile?: string;- /**- * Read-only, resolved by the core on read (never sent on upsert): absolute- * path of the dedicated workspace directory when `dedicatedWorkspace` is set.- */- workspaceDir?: string;- /**- * Read-only, resolved by the core on read (never sent on upsert): absolute- * path of the profile's private `skills/` directory when it exists on disk.- * SKILL.md workflows placed there are scoped to this profile only.- */- skillsDir?: string;-}--export interface AgentProfilesResponse {- profiles: AgentProfile[];- activeProfileId: string;-}diff --git a/app/src/utils/tauriCommands/cron.ts b/app/src/utils/tauriCommands/cron.tsindex 4ae27a1939..6379c1093d 100644--- a/app/src/utils/tauriCommands/cron.ts+++ b/app/src/utils/tauriCommands/cron.ts@@ -32,8 +32,6 @@ export interface CoreCronJob {job_type: 'shell' | 'agent' | string;session_target: 'isolated' | 'main' | string;model?: string | null;- /** Agent profile this job runs as, when attributed (snake_case on the wire). */- profile_id?: string | null;enabled: boolean;delivery: { mode: string; channel?: string | null; to?: string | null; best_effort: boolean };delete_after_run: boolean;@@ -63,8 +61,6 @@ export interface CronAddParams {session_target?: 'isolated' | 'main';model?: string;agent_id?: string;- /** Agent profile to attribute this job to (snake_case on the wire). Omit for none. */- profile_id?: string;delivery?: { mode: string; channel?: string | null; to?: string | null; best_effort?: boolean };delete_after_run?: boolean;}diff --git a/crates/openhuman-embed/README.md b/crates/openhuman-embed/README.mdindex 309c36b92f..c946873036 100644--- a/crates/openhuman-embed/README.md+++ b/crates/openhuman-embed/README.md@@ -99,9 +99,9 @@ println!("{}", again.reply);What each agent owns: its provider route and model, its access tier andturn origin, its `action_dir`, its MCP servers, its skills root-(`<workspace>/personalities/<id>/skills/`), its system prompt, tool scope and-sandbox mode (`AgentDefinitionSpec`), its allowlists (`allowed_tools`,-`allowed_skills`), and a narrowed `DomainSet` / `ToolGroups`. Every turn is+(`<workspace>/agents/<id>/skills/`), its system prompt, tool scope and+sandbox mode (`AgentDefinitionSpec`), and a narrowed `DomainSet` /+`ToolGroups`. Every turn isdispatched under the agent's own `CoreContext`, so the core's config loader,domain gate, tool-group filter and skill discovery all read that agent'ssettings and never another's. Transcripts are keyed by agent id and a turn@@ -116,7 +116,7 @@ Layout under a runtime-owned root:```text<root>/config.toml, auth-profiles.json, core.token-<root>/workspace/session_db/, session_raw/<ts>_<agent>.jsonl, personalities/<agent>/skills/+<root>/workspace/session_db/, session_raw/<ts>_<agent>.jsonl, agents/<agent>/skills/<root>/agents/<agent>/action/ default action_dir```@@ -219,10 +219,6 @@ are documented rather than hidden; each is a candidate follow-up in the core.- `install_skill` / `create_skill` still write to `~/.openhuman`. With`include_user_skills(false)` (the default) an agent does not *discover* theoperator's skills, but an install by the agent lands there.-- `AgentSpec::dedicated_memory` opens a separate memory store through the- memory module, which a library runtime only has when its host preloads- modules (`ServiceSet::memory_queue`). Without it the open times out; leave- the default (shared memory, per-agent transcripts) unless the module runs.- One API key (or session) is shared by all agents.- `IntegrationClient` (backend-proxied Composio/search/media tools) onlyever reads the app-session JWT (`api::jwt::get_session_token`), never thediff --git a/crates/openhuman-embed/src/agent/build.rs b/crates/openhuman-embed/src/agent/build.rsindex 3b56c1dbbe..1174a010e3 100644--- a/crates/openhuman-embed/src/agent/build.rs+++ b/crates/openhuman-embed/src/agent/build.rs@@ -2,12 +2,11 @@//!//! Order matters and is fixed here: validate the id, lay out directories,//! assemble the per-agent `Config` (base → access → provider → MCP → escape-//! hatch), build the profile and definition, copy skills, check the+//! hatch), build the definition, copy skills, check the//! narrowing rules, derive the context.use std::path::Path;-use openhuman_core::agent::profiles::{ensure_profile_home, validate_profile_id};use openhuman_core::core::all::DomainGroup;use openhuman_core::core::runtime::{ContextOverlay, DomainSet};use openhuman_core::tools::toolpacks::{GroupMode, ToolGroups};@@ -18,7 +17,7 @@ use crate::runtime::Runtime;pub(crate) fn instantiate(runtime: &Runtime, spec: AgentSpec) -> Result<AgentInner, AgentError> {let parts = spec.into_parts();let id = parts.id;- validate_profile_id(&id).map_err(|reason| AgentError::InvalidId {+ validate_agent_id(&id).map_err(|reason| AgentError::InvalidId {id: id.clone(),reason,})?;@@ -79,31 +78,6 @@ pub(crate) fn instantiate(runtime: &Runtime, spec: AgentSpec) -> Result<AgentInnconfig.config_path = base.config_path.clone();}- // ── profile ──────────────────────────────────────────────────────────- let mut profile = super::spec::blank_profile(&id);- profile.dedicated_memory = parts.dedicated_memory;- profile.allowed_tools = parts.allowed_tools;- profile.allowed_skills = parts.allowed_skills;- profile.system_prompt_suffix = parts.system_prompt_suffix;- #[cfg(feature = "mcp")]- {- // Deliberately `None` ("all configured servers" — see- // `AgentProfile`'s doc comment), NOT narrowed to `parts.mcp_servers`.- // `config.mcp_client.servers` is already per-agent: `config` starts- // as `base.clone()` and each agent's own `.mcp(...)` declarations are- // appended to its own clone only, never a sibling's (proven by- // `tests/runtime_agents.rs`'s `beta.config().mcp_client.servers.is_empty()`- // while alpha's carries one). So "all configured servers" for THIS- // agent already means only what the runtime's base config seeded- // (host-wide servers meant for every agent, e.g. the docs server —- // see the crate README's "host-seeded documentation server is- // visible to every agent") plus whatever this agent itself declared.- // Narrowing this to `Some(parts.mcp_servers-only)` would additionally- // hide that host-seeded server from any agent that declared no MCP- // servers of its own, which `tests/runtime_agents.rs` pins as- // intended ("both see the host-seeded docs server").- profile.allowed_mcp_servers = None;- }// Read back now, after `config_fn` (the escape hatch, applied above) has// had its chance to edit `config.action_dir` — the directory created and// the layout resolved below must match whatever it ends up being, not@@ -113,19 +87,21 @@ pub(crate) fn instantiate(runtime: &Runtime, spec: AgentSpec) -> Result<AgentInnwhat: "create the agent's action directory",source,})?;- ensure_profile_home(&config.workspace_dir, &config.action_dir, &profile).map_err(|source| {- AgentError::Workspace {- what: "create the agent's profile home",- source,- }+ let layout = AgentLayout::resolve(&config.workspace_dir, &id, action_dir);+ std::fs::create_dir_all(&layout.home).map_err(|source| AgentError::Workspace {+ what: "create the agent's home",+ source,+ })?;+ std::fs::create_dir_all(&layout.skills).map_err(|source| AgentError::Workspace {+ what: "create the agent's skills directory",+ source,})?;- let layout = AgentLayout::resolve(&config.workspace_dir, &profile, action_dir);// ── skills ───────────────────────────────────────────────────────────#[cfg(feature = "skills")]if let Some(dir) = parts.skills_dir.as_deref() {let dest = match parts.skills_dest {- super::spec::SkillsDest::ProfileLocal => layout.skills.clone(),+ super::spec::SkillsDest::AgentLocal => layout.skills.clone(),super::spec::SkillsDest::WorkspaceLegacy => config.workspace_dir.join("skills"),};crate::harness::skills::install(dir, &dest).map_err(map_harness_err)?;@@ -161,11 +137,10 @@ pub(crate) fn instantiate(runtime: &Runtime, spec: AgentSpec) -> Result<AgentInnlog::debug!("[embed][agent] instantiated id={id} action_dir={} routed={} access_origin={} \- dedicated_memory={} user_skills={}",+ user_skills={}",config.action_dir.display(),provider.is_routed(),access.turn_origin().is_some(),- profile.dedicated_memory,parts.include_user_skills);@@ -176,13 +151,28 @@ pub(crate) fn instantiate(runtime: &Runtime, spec: AgentSpec) -> Result<AgentInnctx,config,definition,- profile,provider,access,layout,})}+fn validate_agent_id(id: &str) -> Result<(), String> {+ let bytes = id.as_bytes();+ if bytes.is_empty() || bytes.len() > 64 {+ return Err("must be 1 to 64 characters".to_string());+ }+ if !bytes[0].is_ascii_lowercase() && !bytes[0].is_ascii_digit() {+ return Err("must start with a lowercase letter or digit".to_string());+ }+ if bytes.iter().any(|byte| {+ !byte.is_ascii_lowercase() && !byte.is_ascii_digit() && *byte != b'_' && *byte != b'-'+ }) {+ return Err("may contain only lowercase letters, digits, '_' and '-'".to_string());+ }+ Ok(())+}+/// Every family the agent asks for must be one the runtime registered.pub(crate) fn check_domains_narrow(requested: DomainSet,diff --git a/crates/openhuman-embed/src/agent/layout.rs b/crates/openhuman-embed/src/agent/layout.rsindex 9d6aeb4d5d..87902cb905 100644--- a/crates/openhuman-embed/src/agent/layout.rs+++ b/crates/openhuman-embed/src/agent/layout.rs@@ -1,33 +1,20 @@//! Where one agent's files live.//!//! Everything an agent owns sits under the runtime's workspace, keyed by the-//! agent id, using the core's own per-profile conventions so the desktop's-//! profile tooling and the agent harness read the same paths:+//! agent id://!//! ```text//! <root>///! config.toml, auth-profiles.json, core.token runtime-wide//! workspace///! session_db/sessions.db runtime-wide run ledger-//! personalities/<id>/{SOUL.md, MEMORY.md, skills/} the agent's home+//! agents/<id>/{SOUL.md, MEMORY.md, skills/} the agent's home//! session_raw/<ts>_<id>.jsonl its transcripts-//! session_raw-<id>/, memory-<id>/ with dedicated_memory//! agents/<id>/action/ its default action_dir//! ```-//!-//! Under [`Workspace::Inherit`](crate::Workspace) the same per-profile paths-//! are used inside the operator's workspace, and the default `action_dir`-//! becomes `<action_dir>/profiles/<id>` — the desktop's own dedicated--//! workspace convention — so a library agent never invents a directory the-//! operator's install does not already know about.use std::path::{Path, PathBuf};-use openhuman_core::agent::profiles::{- effective_memory_suffix, profile_action_workspace, profile_home, profile_skills_dir,- session_raw_subdir_for_suffix, AgentProfile,-};-/// Resolved per-agent paths.#[derive(Debug, Clone, PartialEq, Eq)]pub struct AgentLayout {@@ -42,19 +29,14 @@ pub struct AgentLayout {}impl AgentLayout {- /// Lay out `profile` under `workspace_dir`, with `action_dir` either the+ /// Lay out `id` under `workspace_dir`, with `action_dir` either the/// spec's explicit choice or the default for this runtime's workspace/// kind.- pub(crate) fn resolve(- workspace_dir: &Path,- profile: &AgentProfile,- action_dir: PathBuf,- ) -> Self {- let suffix = effective_memory_suffix(profile);+ pub(crate) fn resolve(workspace_dir: &Path, id: &str, action_dir: PathBuf) -> Self {Self {- home: profile_home(workspace_dir, &profile.id),- skills: profile_skills_dir(workspace_dir, &profile.id),- transcripts: workspace_dir.join(session_raw_subdir_for_suffix(&suffix)),+ home: workspace_dir.join("agents").join(id),+ skills: workspace_dir.join("agents").join(id).join("skills"),+ transcripts: workspace_dir.join("session_raw"),action_dir,}}@@ -64,7 +46,7 @@ impl AgentLayout {/// Runtime-owned roots get `<root>/agents/<id>/action` — a sibling of the/// workspace, never inside it, because `is_workspace_internal_path`/// blocks agent writes beneath the workspace fail-closed. An inherited- /// workspace gets the desktop's `<action_dir>/profiles/<id>`.+ /// workspace gets `<action_dir>/agents/<id>`.pub(crate) fn default_action_dir(root_dir: &Path,runtime_action_dir: &Path,@@ -72,7 +54,7 @@ impl AgentLayout {id: &str,) -> PathBuf {if inherited {- profile_action_workspace(runtime_action_dir, id)+ runtime_action_dir.join("agents").join(id)} else {root_dir.join("agents").join(id).join("action")}diff --git a/crates/openhuman-embed/src/agent/layout_tests.rs b/crates/openhuman-embed/src/agent/layout_tests.rsindex 478cd46f7d..bdd50d425e 100644--- a/crates/openhuman-embed/src/agent/layout_tests.rs+++ b/crates/openhuman-embed/src/agent/layout_tests.rs@@ -1,36 +1,17 @@use super::*;-fn profile(id: &str, dedicated: bool) -> AgentProfile {- let mut p = crate::agent::spec::blank_profile(id);- p.dedicated_memory = dedicated;- p-}--#[test]-fn dedicated_memory_keys_transcripts_by_agent_id() {- let ws = Path::new("/r/workspace");- let layout = AgentLayout::resolve(ws, &profile("alpha", true), PathBuf::from("/r/a"));- assert_eq!(layout.home, Path::new("/r/workspace/personalities/alpha"));- assert_eq!(- layout.skills,- Path::new("/r/workspace/personalities/alpha/skills")- );- assert_eq!(- layout.transcripts,- Path::new("/r/workspace/session_raw-alpha")- );- assert_eq!(layout.action_dir, Path::new("/r/a"));-}-#[test]-fn shared_memory_uses_the_workspace_transcript_root() {+fn layout_uses_agent_id_paths() {let ws = Path::new("/r/workspace");- let layout = AgentLayout::resolve(ws, &profile("alpha", false), PathBuf::from("/r/a"));+ let layout = AgentLayout::resolve(ws, "alpha", PathBuf::from("/r/a"));+ assert_eq!(layout.home, Path::new("/r/workspace/agents/alpha"));+ assert_eq!(layout.skills, Path::new("/r/workspace/agents/alpha/skills"));assert_eq!(layout.transcripts, Path::new("/r/workspace/session_raw"));+ assert_eq!(layout.action_dir, Path::new("/r/a"));}#[test]-fn default_action_dir_is_a_workspace_sibling_or_a_profile_dir() {+fn default_action_dir_is_a_workspace_sibling_or_an_agent_dir() {assert_eq!(AgentLayout::default_action_dir(Path::new("/r"), Path::new("/r/action"), false, "a"),Path::new("/r/agents/a/action")@@ -42,6 +23,6 @@ fn default_action_dir_is_a_workspace_sibling_or_a_profile_dir() {true,"a"),- Path::new("/home/u/OpenHuman/projects/profiles/a")+ Path::new("/home/u/OpenHuman/projects/agents/a"));}diff --git a/crates/openhuman-embed/src/agent/mod.rs b/crates/openhuman-embed/src/agent/mod.rsindex 5f8c6cf6b3..3ee8ca4162 100644--- a/crates/openhuman-embed/src/agent/mod.rs+++ b/crates/openhuman-embed/src/agent/mod.rs@@ -7,8 +7,7 @@//! autonomy tier, `action_dir`), its//! [`AgentDefinition`](openhuman_core::agent::harness::definition::AgentDefinition)//! (system prompt, tool scope, sandbox mode), its-//! [`AgentProfile`](openhuman_core::agent::profiles::AgentProfile) (allowlists,-//! dedicated memory and transcripts, prompt suffix), and the derived+//! derived//! [`CoreContext`](openhuman_core::core::runtime::CoreContext) every turn//! dispatches under. Two agents on one runtime never read each other's//! settings: each turn is scoped to its own context, and the core's config@@ -28,7 +27,6 @@ use std::path::Path;use std::sync::Arc;use openhuman_core::agent::harness::definition::AgentDefinition;-use openhuman_core::agent::profiles::AgentProfile;use openhuman_core::config::Config;use openhuman_core::core::runtime::{CoreContext, CoreRuntime};@@ -89,7 +87,6 @@ pub(crate) struct AgentInner {pub(crate) ctx: Arc<CoreContext>,pub(crate) config: Config,pub(crate) definition: AgentDefinition,- pub(crate) profile: AgentProfile,pub(crate) provider: Provider,pub(crate) access: Access,pub(crate) layout: AgentLayout,@@ -155,12 +152,12 @@ impl Agent {&self.inner.config.workspace_dir}- /// `<workspace>/personalities/<id>/` — the agent's home (SOUL.md, MEMORY.md).+ /// `<workspace>/agents/<id>/` — the agent's home (SOUL.md, MEMORY.md).pub fn home_dir(&self) -> &Path {&self.inner.layout.home}- /// `<workspace>/personalities/<id>/skills/` — where its skill bundles were+ /// `<workspace>/agents/<id>/skills/` — where its skill bundles were/// copied and the only skills root it sees besides the workspace's own.pub fn skills_dir(&self) -> &Path {&self.inner.layout.skills@@ -168,7 +165,7 @@ impl Agent {/// Where this agent's transcripts are written: the workspace's shared/// `session_raw/` (files are keyed by agent name), or- /// `session_raw-<id>/` with [`AgentSpec::dedicated_memory`].+ /// `session_raw/`, keyed by agent id.pub fn transcripts_dir(&self) -> &Path {&self.inner.layout.transcripts}diff --git a/crates/openhuman-embed/src/agent/spec.rs b/crates/openhuman-embed/src/agent/spec.rsindex 3232929e6c..ef6a2787b4 100644--- a/crates/openhuman-embed/src/agent/spec.rs+++ b/crates/openhuman-embed/src/agent/spec.rs@@ -4,12 +4,10 @@//! [`Runtime::agent`](crate::Runtime::agent), in a fixed order, onto a clone//! of the runtime's base config — access tier, provider model, MCP servers,//! then the [`config`](AgentSpec::config) escape hatch last — and onto a-//! per-agent [`AgentProfile`](openhuman_core::agent::profiles::AgentProfile)-//! and [`AgentDefinitionSpec`].+//! [`AgentDefinitionSpec`].use std::path::PathBuf;-use openhuman_core::agent::profiles::AgentProfile;use openhuman_core::config::Config;use openhuman_core::core::runtime::DomainSet;use openhuman_core::security::TrustedAccess;@@ -25,8 +23,8 @@ type ConfigEdit = Box<dyn FnOnce(&mut Config) + Send>;#[cfg(feature = "skills")]#[derive(Debug, Clone, Copy, PartialEq, Eq)]pub(crate) enum SkillsDest {- /// `<workspace>/personalities/<id>/skills/` — seen only by this agent.- ProfileLocal,+ /// `<workspace>/agents/<id>/skills/` — seen only by this agent.+ AgentLocal,/// `<workspace>/skills/` — the legacy workspace root the one-agent/// [`Harness`](crate::Harness) always used; kept for its callers.WorkspaceLegacy,@@ -36,13 +34,10 @@ pub(crate) enum SkillsDest {pub struct AgentSpec {id: String,definition: AgentDefinitionSpec,- system_prompt_suffix: Option<String>,provider: Option<Provider>,access: Option<Access>,tool_groups: Option<ToolGroups>,domains: Option<DomainSet>,- allowed_tools: Option<Vec<String>>,- allowed_skills: Option<Vec<String>>,#[cfg(feature = "mcp")]mcp_servers: Vec<crate::harness::McpServer>,#[cfg(feature = "skills")]@@ -52,7 +47,6 @@ pub struct AgentSpec {include_user_skills: bool,action_dir: Option<PathBuf>,trusted: Vec<(String, TrustedAccess)>,- dedicated_memory: bool,config_fn: Option<ConfigEdit>,}@@ -68,23 +62,19 @@ impl AgentSpec {Self {id: id.into(),definition: AgentDefinitionSpec::new(),- system_prompt_suffix: None,provider: None,access: None,tool_groups: None,domains: None,- allowed_tools: None,- allowed_skills: None,#[cfg(feature = "mcp")]mcp_servers: Vec::new(),#[cfg(feature = "skills")]skills_dir: None,#[cfg(feature = "skills")]- skills_dest: SkillsDest::ProfileLocal,+ skills_dest: SkillsDest::AgentLocal,include_user_skills: false,action_dir: None,trusted: Vec::new(),- dedicated_memory: false,config_fn: None,}}@@ -106,12 +96,6 @@ impl AgentSpec {self}- /// Text appended to the system prompt, after the definition's body.- pub fn system_prompt_suffix(mut self, suffix: impl Into<String>) -> Self {- self.system_prompt_suffix = Some(suffix.into());- self- }-/// Which model answers and where the request goes. Unset means the/// runtime's default provider — the managed TinyHumans backend via the/// runtime's API key when no route was given.@@ -147,27 +131,6 @@ impl AgentSpec {self}- /// Tool names this agent may see. Unset means every registered tool.- pub fn allowed_tools<I, S>(mut self, tools: I) -> Self- where- I: IntoIterator<Item = S>,- S: Into<String>,- {- self.allowed_tools = Some(tools.into_iter().map(Into::into).collect());- self- }-- /// Skill ids this agent may list and run. Unset means every discovered- /// skill.- pub fn allowed_skills<I, S>(mut self, skills: I) -> Self- where- I: IntoIterator<Item = S>,- S: Into<String>,- {- self.allowed_skills = Some(skills.into_iter().map(Into::into).collect());- self- }-/// Declare an MCP server this agent may call tools on. Call repeatedly to/// add several. Other agents on the runtime do not see it.#[cfg(feature = "mcp")]@@ -178,12 +141,12 @@ impl AgentSpec {/// Make the skill bundles in `dir` available to this agent alone.///- /// Copied into `<workspace>/personalities/<id>/skills/` — copied rather+ /// Copied into `<workspace>/agents/<id>/skills/` — copied rather/// than linked because skill discovery rejects symlinked bundles.#[cfg(feature = "skills")]pub fn skills_dir(mut self, dir: impl Into<PathBuf>) -> Self {self.skills_dir = Some(dir.into());- self.skills_dest = SkillsDest::ProfileLocal;+ self.skills_dest = SkillsDest::AgentLocal;self}@@ -208,7 +171,7 @@ impl AgentSpec {/// The agent's read/write root for acting tools.////// Defaults to `<root>/agents/<id>/action` (or, on an inherited- /// workspace, `<action_dir>/profiles/<id>`). Point it at the project the+ /// workspace, `<action_dir>/agents/<id>`). Point it at the project the/// agent should work in — this is the directory whose contents it can/// change.pub fn action_dir(mut self, dir: impl Into<PathBuf>) -> Self {@@ -223,22 +186,6 @@ impl AgentSpec {self}- /// Give this agent its own memory store and transcript tree- /// (`memory-<id>`, `session_raw-<id>`) instead of the workspace's shared- /// ones.- ///- /// Off by default. Transcripts are already kept apart without it — they- /// are keyed by agent name and every turn resumes only its own thread —- /// and a dedicated store is opened through the memory module, which a- /// library runtime only has when its host preloads modules- /// (`ServiceSet::memory_queue`). Without the module the open times out- /// on every turn. Turn this on only when memory itself must not be- /// shared between agents and the module is running.- pub fn dedicated_memory(mut self, dedicated: bool) -> Self {- self.dedicated_memory = dedicated;- self- }-/// Arbitrary edits to the agent's config, applied last.////// The escape hatch for the config fields the spec does not model — not@@ -255,13 +202,10 @@ impl AgentSpec {AgentSpecParts {id: self.id,definition: self.definition,- system_prompt_suffix: self.system_prompt_suffix,provider: self.provider,access: self.access,tool_groups: self.tool_groups,domains: self.domains,- allowed_tools: self.allowed_tools,- allowed_skills: self.allowed_skills,#[cfg(feature = "mcp")]mcp_servers: self.mcp_servers,#[cfg(feature = "skills")]@@ -271,7 +215,6 @@ impl AgentSpec {include_user_skills: self.include_user_skills,action_dir: self.action_dir,trusted: self.trusted,- dedicated_memory: self.dedicated_memory,config_fn: self.config_fn,}}@@ -281,13 +224,10 @@ impl AgentSpec {pub(crate) struct AgentSpecParts {pub(crate) id: String,pub(crate) definition: AgentDefinitionSpec,- pub(crate) system_prompt_suffix: Option<String>,pub(crate) provider: Option<Provider>,pub(crate) access: Option<Access>,pub(crate) tool_groups: Option<ToolGroups>,pub(crate) domains: Option<DomainSet>,- pub(crate) allowed_tools: Option<Vec<String>>,- pub(crate) allowed_skills: Option<Vec<String>>,#[cfg(feature = "mcp")]pub(crate) mcp_servers: Vec<crate::harness::McpServer>,#[cfg(feature = "skills")]@@ -297,7 +237,6 @@ pub(crate) struct AgentSpecParts {pub(crate) include_user_skills: bool,pub(crate) action_dir: Option<PathBuf>,pub(crate) trusted: Vec<(String, TrustedAccess)>,- pub(crate) dedicated_memory: bool,pub(crate) config_fn: Option<ConfigEdit>,}@@ -308,40 +247,10 @@ impl std::fmt::Debug for AgentSpec {.field("id", &self.id).field("access", &self.access).field("action_dir", &self.action_dir)- .field("dedicated_memory", &self.dedicated_memory).finish_non_exhaustive()}}-/// An [`AgentProfile`] for `id` with nothing enabled beyond the id itself.-pub(crate) fn blank_profile(id: &str) -> AgentProfile {- AgentProfile {- id: id.to_string(),- name: id.to_string(),- description: String::new(),- agent_id: id.to_string(),- model_override: None,- temperature: None,- system_prompt_suffix: None,- allowed_tools: None,- built_in: false,- avatar_url: None,- voice_id: None,- soul_md: None,- soul_md_path: None,- composio_integrations: None,- memory_sources: None,- include_agent_conversations: true,- allowed_skills: None,- allowed_mcp_servers: None,- memory_dir_suffix: None,- is_master: false,- sort_order: None,- dedicated_memory: false,- dedicated_workspace: false,- }-}-#[cfg(test)]#[path = "spec_tests.rs"]mod tests;diff --git a/crates/openhuman-embed/src/agent/spec_tests.rs b/crates/openhuman-embed/src/agent/spec_tests.rsindex beffcb335a..76e31ab233 100644--- a/crates/openhuman-embed/src/agent/spec_tests.rs+++ b/crates/openhuman-embed/src/agent/spec_tests.rs@@ -45,12 +45,3 @@ fn tool_groups_may_only_narrow_the_runtime() {let err = check_tool_groups_narrow(&widened, &runtime).expect_err("widens");assert!(matches!(err, AgentError::WidensRuntime(_)), "{err:?}");}--#[test]-fn blank_profile_carries_only_the_id() {- let p = blank_profile("alpha");- assert_eq!(p.id, "alpha");- assert_eq!(p.agent_id, "alpha");- assert!(!p.dedicated_memory);- assert!(p.allowed_tools.is_none());-}diff --git a/crates/openhuman-embed/src/turn.rs b/crates/openhuman-embed/src/turn.rsindex 517097a0ee..adb1ed7466 100644--- a/crates/openhuman-embed/src/turn.rs+++ b/crates/openhuman-embed/src/turn.rs@@ -439,8 +439,6 @@ async fn dispatch(target: TurnTarget, request: TurnRequest) -> Result<String, Co);let target = AgentChatTarget::Definition {definition: &inner.definition,- profile: Some(&inner.profile),- profile_prompt_suffix: inner.profile.system_prompt_suffix.as_deref(),};agent_chat_for(&mut config,diff --git a/crates/openhuman-embed/tests/public_api.rs b/crates/openhuman-embed/tests/public_api.rsindex a1748f34e1..98a4025def 100644--- a/crates/openhuman-embed/tests/public_api.rs+++ b/crates/openhuman-embed/tests/public_api.rs@@ -54,7 +54,6 @@ fn exposes_the_host_facing_embedding_contract() {.access(Access::readonly()).action_dir("/tmp/embed-public-api").include_user_skills(false)- .dedicated_memory(false).config(|_config| {});let _ = DomainSet::embedded;let _ = ServiceSet::none;diff --git a/crates/openhuman-embed/tests/runtime_agents.rs b/crates/openhuman-embed/tests/runtime_agents.rsindex 3fea85d9a6..cc2be8f6cb 100644--- a/crates/openhuman-embed/tests/runtime_agents.rs+++ b/crates/openhuman-embed/tests/runtime_agents.rs@@ -218,7 +218,7 @@ fn one_runtime_hosts_independently_configured_agents() {{assert!(alpha.skills_dir().join("alpha-skill/SKILL.md").is_file(),- "alpha's bundle lands in its profile-local skills root"+ "alpha's bundle lands in its agent-local skills root");assert!(!beta.skills_dir().join("alpha-skill").exists(),diff --git a/crates/openhuman-tui/src/app.rs b/crates/openhuman-tui/src/app.rsindex 30bdc3a195..45f9918aa1 100644--- a/crates/openhuman-tui/src/app.rs+++ b/crates/openhuman-tui/src/app.rs@@ -330,7 +330,6 @@ fn send_message(let tid = ui.thread_id.clone();let mode = queue_mode.to_string();let model_override = ui.model_override.clone();- let profile_id = ui.profile_id.clone();tokio::spawn(async move {let params = json!({"client_id": cid,@@ -339,7 +338,6 @@ fn send_message("source": "type","queue_mode": mode,"model_override": model_override,- "profile_id": profile_id,});if let Err(e) = rt.invoke("openhuman.channel_web_chat", params).await {log::error!("[tui] openhuman.channel_web_chat failed: {e}");@@ -534,11 +532,6 @@ async fn execute_command("Model",ui.model_override.as_deref().unwrap_or("configured default"),),- text_row(- "profile",- "Profile",- ui.profile_id.as_deref().unwrap_or("active default"),- ),text_row("cwd","Action directory",@@ -580,10 +573,10 @@ async fn execute_command(ui,OverlayKind::Agents,"Agents",- "openhuman.profiles_list",+ "openhuman.agent_list_definitions",json!({}),- &["profiles", "items"],- &["id", "profile_id"],+ &["definitions", "items"],+ &["id"],&["name", "display_name", "id"],).await@@ -915,19 +908,6 @@ async fn handle_overlay_key(ui.overlay = None;}OverlayKind::Agents => {- if let Some(row) = selected {- match runtime- .invoke("openhuman.profiles_select", json!({"profile_id": row.id}))- .await- {- Ok(_) => {- ui.profile_id = Some(row.id);- state.push_system(format!("Agent profile set to {}.", row.label));- }- Err(error) => state- .push_system(format!("Could not select agent profile: {error}")),- }- }ui.overlay = None;}OverlayKind::Files => {diff --git a/crates/openhuman-tui/src/composer.rs b/crates/openhuman-tui/src/composer.rsindex 9d5a7f367c..1b7a103f05 100644--- a/crates/openhuman-tui/src/composer.rs+++ b/crates/openhuman-tui/src/composer.rs@@ -14,7 +14,7 @@ pub const COMMANDS: &[(&str, &str)] = &[("permissions", "inspect or change agent access"),("status", "show session, core, and Git status"),("usage", "show token and cost usage"),- ("agents", "browse and switch agent profiles"),+ ("agents", "browse available agent definitions"),("skills", "browse installed skills and recent runs"),("mcp", "show installed MCP servers"),("artifacts", "browse generated artifacts"),diff --git a/crates/openhuman-tui/src/runner_tests.rs b/crates/openhuman-tui/src/runner_tests.rsindex fb323c2d3e..d781b746b2 100644--- a/crates/openhuman-tui/src/runner_tests.rs+++ b/crates/openhuman-tui/src/runner_tests.rs@@ -52,8 +52,7 @@ fn tui_invokes_use_canonical_registered_rpc_method_names() {"openhuman.threads_update_title","openhuman.threads_delete","openhuman.threads_token_usage",- "openhuman.profiles_list",- "openhuman.profiles_select",+ "openhuman.agent_list_definitions","openhuman.ai_list_artifacts","openhuman.approval_list_pending","openhuman.approval_decide",diff --git a/crates/openhuman-tui/src/ui_state.rs b/crates/openhuman-tui/src/ui_state.rsindex 143fa523ff..bd90b4991c 100644--- a/crates/openhuman-tui/src/ui_state.rs+++ b/crates/openhuman-tui/src/ui_state.rs@@ -105,7 +105,6 @@ pub struct UiState {pub pending_approvals: Vec<PendingApproval>,pub pending_plan_review: Option<PendingPlanReview>,pub model_override: Option<String>,- pub profile_id: Option<String>,pub action_dir: String,pub queue_status: String,}@@ -160,7 +159,6 @@ impl UiState {pending_approvals: Vec::new(),pending_plan_review: None,model_override: None,- profile_id: None,action_dir: String::new(),queue_status: String::new(),}