Skip to content

The agent that grows with you

refactor: move aux-slot growth into topical siblings (code-health caps)

Teknium68420e1912a4
diff --git a/agent/auxiliary_client.py b/agent/auxiliary_client.py
index 3f7246da990..168b68293eb 100644
--- a/agent/auxiliary_client.py
+++ b/agent/auxiliary_client.py
@@ -6269,70 +6269,9 @@ _DEFAULT_AUX_TIMEOUT = 30.0
_COMPRESSION_TIMEOUT_FLOOR_SECONDS = 300.0
-def _get_auxiliary_task_config(task: str, _seen: frozenset = frozenset()) -> Dict[str, Any]:
- """Config dict for auxiliary.<task>, or {} when unavailable. Plugin-registered tasks get their
- declared defaults layered under user config (user wins); built-in defaults live in DEFAULT_CONFIG.
- A task registered with ``inherit_from`` is resolved here, at read time, over the base task's
- effective config, so it follows the base's current settings (and the active profile's config)
- until the user pins a route on the task itself. ``_seen`` guards re-registration cycles."""
- if not task:
- return {}
- try:
- from hermes_cli.config import load_config_readonly
- config = load_config_readonly()
- except ImportError:
- return {}
- aux = config.get("auxiliary", {}) if isinstance(config, dict) else {}
- task_config = aux.get(task, {}) if isinstance(aux, dict) else {}
- if not isinstance(task_config, dict):
- task_config = {}
- try:
- from hermes_cli.plugins import get_plugin_auxiliary_tasks
- for _entry in get_plugin_auxiliary_tasks():
- if _entry.get("key") == task:
- _defaults = _entry.get("defaults") or {}
- if isinstance(_defaults, dict):
- _inherit = _entry.get("inherit_from")
- if _inherit and task in _seen:
- logger.warning("Auxiliary task %r has a circular inherit_from chain — "
- "ignoring inheritance", task)
- if not _inherit or task in _seen:
- return {**_defaults, **task_config}
- base = _get_auxiliary_task_config(_inherit, _seen | {task})
- return _layer_over_inherited({**base, **_defaults}, task_config)
- break
- except Exception:
- pass # plugin discovery failure must not break aux task config reads
- return task_config
-
-
-# The fields that together pick WHERE a call goes. They travel as one unit: a provider pinned on an
-# inheriting task must never pick up the base's base_url/api_key (that would send one vendor's key
-# to another's endpoint).
-_AUX_ROUTE_KEYS = frozenset({"provider", "model", "base_url", "api_key", "api_mode", "key_env",
- "api_key_env", "reasoning_effort"})
-
-
-def _layer_over_inherited(inherited: Dict[str, Any], user: Dict[str, Any]) -> Dict[str, Any]:
- """Merge a task's own ``auxiliary.<task>`` block over its inherited base.
-
- The picker, "reset to auto" and the dashboard persist ``provider: auto`` plus ``""`` for
- model/base_url/api_key/reasoning_effort when the operator expresses no preference, so those
- placeholders mean "follow the base", not "override it with nothing". Once the operator pins a
- route (a non-auto provider, a model or a base_url) the whole route comes from the task's own
- block. Non-route keys (timeout, extra_body, ...) override per key; only ``""`` is dropped,
- never other falsy values (``reasoning_effort: false`` is an explicit choice)."""
- provider = str(user.get("provider") or "").strip().lower()
- pinned = (provider not in ("", "auto") or bool(str(user.get("model") or "").strip())
- or bool(str(user.get("base_url") or "").strip()))
- merged = {k: v for k, v in inherited.items() if not (pinned and k in _AUX_ROUTE_KEYS)}
- for key, value in user.items():
- if value == "" and not (pinned and key in _AUX_ROUTE_KEYS):
- continue
- if key == "provider" and not pinned:
- continue
- merged[key] = value
- return merged
+# Read-time resolution of auxiliary.<task> (plugin defaults, inherit_from) lives in its own module;
+# re-exported here because callers and tests reach it as agent.auxiliary_client._get_auxiliary_task_config.
+from agent.auxiliary_task_config import _get_auxiliary_task_config # noqa: E402,F401
class CompressionFastLane(NamedTuple):
diff --git a/agent/auxiliary_task_config.py b/agent/auxiliary_task_config.py
new file mode 100644
index 00000000000..e822a1c8f5b
--- /dev/null
+++ b/agent/auxiliary_task_config.py
@@ -0,0 +1,79 @@
+"""Read-time resolution of an ``auxiliary.<task>`` config block.
+
+Built-in slot defaults come from ``DEFAULT_CONFIG``; plugin-registered tasks
+(``PluginContext.register_auxiliary_task``) layer their declared ``defaults``
+under the user's block and may inherit another slot via ``inherit_from``.
+"""
+
+from __future__ import annotations
+
+import logging
+from typing import Any, Dict
+
+logger = logging.getLogger(__name__)
+
+
+def _get_auxiliary_task_config(task: str, _seen: frozenset = frozenset()) -> Dict[str, Any]:
+ """Config dict for auxiliary.<task>, or {} when unavailable. Plugin-registered tasks get their
+ declared defaults layered under user config (user wins); built-in defaults live in DEFAULT_CONFIG.
+ A task registered with ``inherit_from`` is resolved here, at read time, over the base task's
+ effective config, so it follows the base's current settings (and the active profile's config)
+ until the user pins a route on the task itself. ``_seen`` guards re-registration cycles."""
+ if not task:
+ return {}
+ try:
+ from hermes_cli.config import load_config_readonly
+ config = load_config_readonly()
+ except ImportError:
+ return {}
+ aux = config.get("auxiliary", {}) if isinstance(config, dict) else {}
+ task_config = aux.get(task, {}) if isinstance(aux, dict) else {}
+ if not isinstance(task_config, dict):
+ task_config = {}
+ try:
+ from hermes_cli.plugins import get_plugin_auxiliary_tasks
+ for _entry in get_plugin_auxiliary_tasks():
+ if _entry.get("key") == task:
+ _defaults = _entry.get("defaults") or {}
+ if isinstance(_defaults, dict):
+ _inherit = _entry.get("inherit_from")
+ if _inherit and task in _seen:
+ logger.warning("Auxiliary task %r has a circular inherit_from chain — "
+ "ignoring inheritance", task)
+ if not _inherit or task in _seen:
+ return {**_defaults, **task_config}
+ base = _get_auxiliary_task_config(_inherit, _seen | {task})
+ return _layer_over_inherited({**base, **_defaults}, task_config)
+ break
+ except Exception: # health: allow BLE001 -- plugin discovery must never break aux config reads
+ logger.debug("plugin auxiliary task lookup failed for %r", task, exc_info=True)
+ return task_config
+
+
+# The fields that together pick WHERE a call goes. They travel as one unit: a provider pinned on an
+# inheriting task must never pick up the base's base_url/api_key (that would send one vendor's key
+# to another's endpoint).
+_AUX_ROUTE_KEYS = frozenset({"provider", "model", "base_url", "api_key", "api_mode", "key_env",
+ "api_key_env", "reasoning_effort"})
+
+
+def _layer_over_inherited(inherited: Dict[str, Any], user: Dict[str, Any]) -> Dict[str, Any]:
+ """Merge a task's own ``auxiliary.<task>`` block over its inherited base.
+
+ The picker, "reset to auto" and the dashboard persist ``provider: auto`` plus ``""`` for
+ model/base_url/api_key/reasoning_effort when the operator expresses no preference, so those
+ placeholders mean "follow the base", not "override it with nothing". Once the operator pins a
+ route (a non-auto provider, a model or a base_url) the whole route comes from the task's own
+ block. Non-route keys (timeout, extra_body, ...) override per key; only ``""`` is dropped,
+ never other falsy values (``reasoning_effort: false`` is an explicit choice)."""
+ provider = str(user.get("provider") or "").strip().lower()
+ pinned = (provider not in ("", "auto") or bool(str(user.get("model") or "").strip())
+ or bool(str(user.get("base_url") or "").strip()))
+ merged = {k: v for k, v in inherited.items() if not (pinned and k in _AUX_ROUTE_KEYS)}
+ for key, value in user.items():
+ if value == "" and not (pinned and key in _AUX_ROUTE_KEYS):
+ continue
+ if key == "provider" and not pinned:
+ continue
+ merged[key] = value
+ return merged
diff --git a/apps/desktop/src/app/settings/aux-task-rows.tsx b/apps/desktop/src/app/settings/aux-task-rows.tsx
new file mode 100644
index 00000000000..b2c1a0f4a8c
--- /dev/null
+++ b/apps/desktop/src/app/settings/aux-task-rows.tsx
@@ -0,0 +1,158 @@
+import { isReasoningEffort } from '@hermes/shared'
+import { useCallback, useMemo } from 'react'
+
+import { Button } from '@/components/ui/button'
+import { useI18n } from '@/i18n'
+import type { AuxiliaryTaskAssignment, ModelAssignmentRequest } from '@/types/hermes'
+
+import { useDeepLinkHighlight } from './use-deep-link-highlight'
+
+// Built-in auxiliary tasks, in the order `_AUX_TASK_SLOTS` (hermes_cli/web_server_config.py)
+// serves them. Friendly labels and hints come from i18n `m.tasks`; raw task keys (vision,
+// mcp, …) are opaque to most users. Plugin-registered tasks are not listed here: the backend
+// appends them to `/api/model/auxiliary` with their own `label`/`hint` (see `auxTaskRows`).
+interface AuxTaskMeta {
+ key: string
+ /** Server-declared copy for a plugin task; built-ins resolve through i18n instead. */
+ label?: string
+ hint?: string
+ /** Plugin task that follows this slot until it is pinned itself. */
+ inheritFrom?: string
+}
+
+const AUX_TASKS: readonly AuxTaskMeta[] = [
+ { key: 'vision' },
+ { key: 'compression' },
+ { key: 'skills_hub' },
+ { key: 'approval' },
+ { key: 'mcp' },
+ { key: 'title_generation' },
+ { key: 'review' },
+ // Same three canonical slots the backend serves but the list below used to
+ // omit (#97297): triage_specifier, kanban_decomposer, profile_describer.
+ { key: 'triage_specifier' },
+ { key: 'kanban_decomposer' },
+ { key: 'profile_describer' },
+ { key: 'curator' }
+]
+
+// Rows to render: the built-ins above, then every task the backend reported that is not a
+// built-in — i.e. plugin-registered auxiliary tasks (PluginContext.register_auxiliary_task),
+// which arrive with the plugin's own label/hint and inherited base. Older backends never send
+// extra rows, so this is a no-op against them. Built-ins stay first so the layout is stable.
+export function auxTaskRows(tasks: readonly AuxiliaryTaskAssignment[] | undefined): AuxTaskMeta[] {
+ const builtin = new Set(AUX_TASKS.map(meta => meta.key))
+
+ const extra = (tasks ?? [])
+ .filter(entry => !builtin.has(entry.task))
+ .map(entry => ({
+ key: entry.task,
+ label: entry.label || entry.task,
+ hint: entry.hint || '',
+ inheritFrom: entry.inherit_from || undefined
+ }))
+
+ return extra.length ? [...AUX_TASKS, ...extra] : [...AUX_TASKS]
+}
+
+/** The rows plus a label resolver that knows plugin tasks (i18n for built-ins, server copy else). */
+export function useAuxTaskRows(
+ tasks: readonly AuxiliaryTaskAssignment[] | undefined,
+ list: { loading: boolean; visible: boolean }
+) {
+ const { t } = useI18n()
+ const labels = t.settings.model.tasks
+ const auxRows = useMemo(() => auxTaskRows(tasks), [tasks])
+
+ // Deep link from the vision Capabilities detail (?tab=config:model&aux=vision):
+ // scroll the auxiliary task row into view and flash it once the list loads.
+ useDeepLinkHighlight({
+ elementId: task => `aux-task-${task}`,
+ param: 'aux',
+ ready: task => list.visible && !list.loading && auxRows.some(meta => meta.key === task)
+ })
+
+ const auxiliaryTaskLabel = useCallback(
+ (key: string) => labels[key]?.label ?? auxRows.find(meta => meta.key === key)?.label ?? key,
+ [labels, auxRows]
+ )
+
+ return { auxRows, auxiliaryTaskLabel }
+}
+
+/**
+ * Route line of one auxiliary-model row: the pinned route, "auto · use main model", or, for an
+ * unpinned plugin task registered with `inherit_from`, `inherits <Base> · <route it resolves to>`.
+ */
+export function AuxTaskRouteSummary({
+ current,
+ inheritLabel
+}: {
+ current?: AuxiliaryTaskAssignment
+ inheritLabel?: string
+}) {
+ const { t } = useI18n()
+ const m = t.settings.model
+ const isAuto = !current || !current.provider || current.provider === 'auto'
+ const effective = current?.effective
+ const effort = current?.reasoning_effort
+
+ const effectiveRoute =
+ effective?.provider && effective.provider !== 'auto'
+ ? `${effective.provider} · ${effective.model || m.providerDefault}`
+ : m.autoUseMain
+
+ const autoLine = inheritLabel ? `${m.inheritsFrom(inheritLabel)} · ${effectiveRoute}` : m.autoUseMain
+
+ return (
+ <span className="font-mono text-[0.68rem]">
+ {isAuto ? autoLine : `${current.provider} · ${current.model || m.providerDefault}`}
+ {!isAuto && current.base_url && <span className="text-muted-foreground"> · {current.base_url}</span>}
+ {effort && (
+ <span className="text-muted-foreground">
+ {' · '}
+ {effort === 'none'
+ ? `${m.reasoning} ${m.reasoningOff}`
+ : isReasoningEffort(effort)
+ ? t.shell.modelOptions[effort]
+ : effort}
+ </span>
+ )}
+ </span>
+ )
+}
+
+/** Route that puts a pinned inheriting plugin slot back on its base: "auto" + no model on such a
+ * slot means "no preference here" (agent/auxiliary_task_config.py::_layer_over_inherited). */
+export const AUX_FOLLOW_BASE: Omit<ModelAssignmentRequest, 'scope' | 'task'> = {
+ model: '',
+ provider: 'auto',
+ reasoning_effort: null
+}
+
+/** "Set to main": pin a slot to the main model (plus the endpoint a custom/local main needs). */
+export function auxMainRoute(
+ main: { model: string; provider: string },
+ endpointFor: (provider: string) => object
+): Omit<ModelAssignmentRequest, 'scope' | 'task'> {
+ return { model: main.model, provider: main.provider, ...endpointFor(main.provider) }
+}
+
+/** "Follow <Base>" on a pinned plugin slot registered with `inherit_from`. */
+export function AuxFollowBaseButton({
+ baseLabel,
+ disabled,
+ onFollow
+}: {
+ baseLabel: string
+ disabled: boolean
+ onFollow: () => void
+}) {
+ const { t } = useI18n()
+
+ return (
+ <Button disabled={disabled} onClick={onFollow} size="sm" variant="text">
+ {t.settings.model.followTask(baseLabel)}
+ </Button>
+ )
+}
diff --git a/apps/desktop/src/app/settings/model-settings.tsx b/apps/desktop/src/app/settings/model-settings.tsx
index a62a16c0c09..60eae7b1de6 100644
--- a/apps/desktop/src/app/settings/model-settings.tsx
+++ b/apps/desktop/src/app/settings/model-settings.tsx
@@ -1,5 +1,5 @@
import type { ModelOptionProvider } from '@hermes/shared'
-import { DEFAULT_REASONING_EFFORT, isReasoningEffort, REASONING_EFFORT_VALUES } from '@hermes/shared'
+import { DEFAULT_REASONING_EFFORT, REASONING_EFFORT_VALUES } from '@hermes/shared'
import { useStore } from '@nanostores/react'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
@@ -24,6 +24,7 @@ import type {
AuxiliaryTaskAssignment,
MoaConfigResponse,
MoaModelSlot,
+ ModelAssignmentRequest,
StaleAuxAssignment
} from '@/hermes'
import { useI18n } from '@/i18n'
@@ -42,12 +43,18 @@ import { hermesConfigCacheWriter, invalidateHermesConfig, useHermesConfigRecord
import { useOnProfileSwitch } from '../hooks/use-on-profile-switch'
import { PanelEmpty } from '../overlays/panel'
+import {
+ AUX_FOLLOW_BASE,
+ AuxFollowBaseButton,
+ auxMainRoute,
+ AuxTaskRouteSummary,
+ useAuxTaskRows
+} from './aux-task-rows'
import { CONTROL_TEXT } from './constants'
import { getNested, setNested } from './helpers'
import { ModelSelect, withActive } from './model-select'
import { ListRow, ListRowSkeleton, Pill, SectionHeading, SectionHeadingSkeleton } from './primitives'
import { dismissStaleAux, readStaleAuxDismissal, staleAuxFingerprint } from './stale-aux-dismissal'
-import { useDeepLinkHighlight } from './use-deep-link-highlight'
// Skeleton mirror of the Model settings DOM so the page keeps its shape while
// the provider/model catalog loads, instead of collapsing to a centered
@@ -95,54 +102,6 @@ function isProviderReady(p?: ModelOptionProvider): boolean {
return !!p && (p.authenticated !== false || (p.models?.length ?? 0) > 0)
}
-// Built-in auxiliary tasks, in the order `_AUX_TASK_SLOTS` (hermes_cli/web_server_config.py)
-// serves them. Friendly labels and hints come from i18n `m.tasks`; raw task keys (vision,
-// mcp, …) are opaque to most users. Plugin-registered tasks are not listed here: the backend
-// appends them to `/api/model/auxiliary` with their own `label`/`hint` (see `auxTaskRows`).
-interface AuxTaskMeta {
- key: string
- /** Server-declared copy for a plugin task; built-ins resolve through i18n instead. */
- label?: string
- hint?: string
- /** Plugin task that follows this slot until it is pinned itself. */
- inheritFrom?: string
-}
-
-const AUX_TASKS: readonly AuxTaskMeta[] = [
- { key: 'vision' },
- { key: 'compression' },
- { key: 'skills_hub' },
- { key: 'approval' },
- { key: 'mcp' },
- { key: 'title_generation' },
- { key: 'review' },
- // Same three canonical slots the backend serves but the list below used to
- // omit (#97297): triage_specifier, kanban_decomposer, profile_describer.
- { key: 'triage_specifier' },
- { key: 'kanban_decomposer' },
- { key: 'profile_describer' },
- { key: 'curator' }
-]
-
-// Rows to render: the built-ins above, then every task the backend reported that is not a
-// built-in — i.e. plugin-registered auxiliary tasks (PluginContext.register_auxiliary_task),
-// which arrive with the plugin's own label/hint and inherited base. Older backends never send
-// extra rows, so this is a no-op against them. Built-ins stay first so the layout is stable.
-export function auxTaskRows(tasks: readonly AuxiliaryTaskAssignment[] | undefined): AuxTaskMeta[] {
- const builtin = new Set(AUX_TASKS.map(meta => meta.key))
-
- const extra = (tasks ?? [])
- .filter(entry => !builtin.has(entry.task))
- .map(entry => ({
- key: entry.task,
- label: entry.label || entry.task,
- hint: entry.hint || '',
- inheritFrom: entry.inherit_from || undefined
- }))
-
- return extra.length ? [...AUX_TASKS, ...extra] : [...AUX_TASKS]
-}
-
const NO_PROVIDERS: readonly ModelOptionProvider[] = [{ name: '—', slug: '', models: [] }]
// A slot is complete when both halves are chosen. Changing a slot's provider
@@ -297,14 +256,6 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
const [apiKeyDraft, setApiKeyDraft] = useState('')
const [activating, setActivating] = useState(false)
- // Deep link from the vision Capabilities detail (?tab=config:model&aux=vision):
- // scroll the auxiliary task row into view and flash it once the list loads.
- useDeepLinkHighlight({
- elementId: task => `aux-task-${task}`,
- param: 'aux',
- ready: task => showAuxiliary && !loading && auxTaskRows(auxiliary?.tasks).some(meta => meta.key === task)
- })
-
// Every profile-scoped async here captures this and bails before writing back,
// so a request in flight when the user switches profiles can't paint profile
// A's models/providers into profile B (or fire onMainModelChanged for A).
@@ -610,12 +561,7 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
[m.loadFailed, scopeProfile, setCaughtError]
)
- const auxRows = useMemo(() => auxTaskRows(auxiliary?.tasks), [auxiliary])
-
- const auxiliaryTaskLabel = useCallback(
- (key: string) => m.tasks[key]?.label ?? auxRows.find(meta => meta.key === key)?.label ?? key,
- [m.tasks, auxRows]
- )
+ const { auxRows, auxiliaryTaskLabel } = useAuxTaskRows(auxiliary?.tasks, { loading, visible: showAuxiliary })
const persistentStaleAux = useMemo<StaleAuxAssignment[]>(
() => staleAuxAssignments(auxiliary?.tasks ?? [], mainModel?.provider ?? ''),
@@ -830,48 +776,13 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
[providers]
)
- const setAuxiliaryToMain = useCallback(
- async (task: string) => {
- if (!mainModel) {
- return
- }
-
- setApplying(true)
- setError('')
-
- try {
- await setModelAssignment(
- {
- model: mainModel.model,
- provider: mainModel.provider,
- scope: 'auxiliary',
- task,
- ...endpointForProvider(mainModel.provider)
- },
- scopeProfile
- )
- await refresh()
- } catch (err) {
- setCaughtError(err, m.loadFailed)
- } finally {
- setApplying(false)
- }
- },
- [endpointForProvider, m.loadFailed, mainModel, refresh, scopeProfile, setCaughtError]
- )
-
- // An inheriting plugin slot pinned by the user goes back to following its base: "auto" on such a
- // slot means "no preference here" (agent/auxiliary_client.py::_layer_over_inherited).
- const followAuxiliaryBase = useCallback(
- async (task: string) => {
+ const assignAuxiliary = useCallback(
+ async (task: string, route: Omit<ModelAssignmentRequest, 'scope' | 'task'>) => {
setApplying(true)
setError('')
try {
- await setModelAssignment(
- { model: '', provider: 'auto', reasoning_effort: null, scope: 'auxiliary', task },
- scopeProfile
- )
+ await setModelAssignment({ ...route, scope: 'auxiliary', task }, scopeProfile)
await refresh()
} catch (err) {
setCaughtError(err, m.loadFailed)
@@ -1176,13 +1087,6 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
const current = auxiliary?.tasks.find(entry => entry.task === meta.key)
const isAuto = !current || !current.provider || current.provider === 'auto'
const isEditing = editingAuxTask === meta.key
- const effective = current?.effective
- const followsBase = isAuto && !!meta.inheritFrom
-
- const effectiveRoute =
- effective?.provider && effective.provider !== 'auto'
- ? `${effective.provider} · ${effective.model || m.providerDefault}`
- : m.autoUseMain
return (
<div className="scroll-mt-6 rounded-lg" id={`aux-task-${meta.key}`} key={meta.key}>
@@ -1191,18 +1095,17 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
!isEditing && (
<div className="flex shrink-0 items-center gap-1.5">
{meta.inheritFrom && !isAuto && (
- <Button
+ <AuxFollowBaseButton
+ baseLabel={auxiliaryTaskLabel(meta.inheritFrom)}
disabled={applying}
- onClick={() => void followAuxiliaryBase(meta.key)}
- size="sm"
- variant="text"
- >
- {m.followTask(auxiliaryTaskLabel(meta.inheritFrom))}
- </Button>
+ onFollow={() => void assignAuxiliary(meta.key, AUX_FOLLOW_BASE)}
+ />
)}
<Button
disabled={!mainModel || applying}
- onClick={() => void setAuxiliaryToMain(meta.key)}
+ onClick={() =>
+ mainModel && void assignAuxiliary(meta.key, auxMainRoute(mainModel, endpointForProvider))
+ }
size="sm"
variant="text"
>
@@ -1289,26 +1192,10 @@ export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: Mod
)
}
description={
- <span className="font-mono text-[0.68rem]">
- {followsBase
- ? `${m.inheritsFrom(auxiliaryTaskLabel(meta.inheritFrom ?? ''))} · ${effectiveRoute}`
- : isAuto
- ? m.autoUseMain
- : `${current.provider} · ${current.model || m.providerDefault}`}
- {!isAuto && current.base_url && (
- <span className="text-muted-foreground"> · {current.base_url}</span>
- )}
- {current?.reasoning_effort && (
- <span className="text-muted-foreground">
- {' · '}
- {current.reasoning_effort === 'none'
- ? `${m.reasoning} ${m.reasoningOff}`
- : isReasoningEffort(current.reasoning_effort)
- ? t.shell.modelOptions[current.reasoning_effort]
- : current.reasoning_effort}
- </span>
- )}
- </span>
+ <AuxTaskRouteSummary
+ current={current}
+ inheritLabel={meta.inheritFrom ? auxiliaryTaskLabel(meta.inheritFrom) : undefined}
+ />
}
title={
<span className="flex items-baseline gap-2">
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index bc24f23fa18..5c25d80ced6 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -1,5 +1,6 @@
import { defineFieldCopy } from '@/app/settings/field-copy'
+import { deAuxTasks } from './de_aux_tasks'
import { deModelMenu } from './de_model_menu'
import { defineLocale, type TranslationOverrides } from './define-locale'
import { introDe } from './intro-de'
@@ -2139,52 +2140,7 @@ export const deOverrides = {
moaAggregator: 'Aggregator',
moaAggregatorBilled: 'handelndes Modell · wird für den Lauf berechnet',
moaReferenceHint: 'berät standardmäßig einmal pro Turn',
- tasks: {
- vision: {
- label: 'Sehen',
- hint: 'Bildanalyse'
- },
- compression: {
- label: 'Kompression',
- hint: 'Kontext-Verdichtung'
- },
- skills_hub: {
- label: 'Skills-Hub',
- hint: 'Skill-Suche'
- },
- approval: {
- label: 'Freigabe',
- hint: 'Intelligente Auto-Freigabe'
- },
- mcp: {
- label: 'MCP',
- hint: 'MCP-Tool-Routing'
- },
- title_generation: {
- label: 'Titel-Generierung',
- hint: 'Session-Titel'
- },
- review: {
- label: 'Review',
- hint: '/review Bewertungs-Subagent'
- },
- triage_specifier: {
- label: 'Triage-Spezifizierer',
- hint: 'Kanban-Spezifikation ausarbeiten'
- },
- kanban_decomposer: {
- label: 'Kanban-Zerleger',
- hint: 'Aufgaben zerlegen'
- },
- profile_describer: {
- label: 'Profil-Beschreiber',
- hint: 'Automatische Profilbeschreibungen'
- },
- curator: {
- label: 'Kurator',
- hint: 'Skill-Nutzungs-Review'
- }
- }
+ tasks: deAuxTasks
},
localModels: {
connectionChanged: 'Verbindung für lokale Modelle geändert',
diff --git a/apps/desktop/src/i18n/de_aux_tasks.ts b/apps/desktop/src/i18n/de_aux_tasks.ts
new file mode 100644
index 00000000000..ae3a737359c
--- /dev/null
+++ b/apps/desktop/src/i18n/de_aux_tasks.ts
@@ -0,0 +1,48 @@
+import type { AuxTaskCopyMap } from './types_aux_tasks'
+
+export const deAuxTasks: AuxTaskCopyMap = {
+ vision: {
+ label: 'Sehen',
+ hint: 'Bildanalyse'
+ },
+ compression: {
+ label: 'Kompression',
+ hint: 'Kontext-Verdichtung'
+ },
+ skills_hub: {
+ label: 'Skills-Hub',
+ hint: 'Skill-Suche'
+ },
+ approval: {
+ label: 'Freigabe',
+ hint: 'Intelligente Auto-Freigabe'
+ },
+ mcp: {
+ label: 'MCP',
+ hint: 'MCP-Tool-Routing'
+ },
+ title_generation: {
+ label: 'Titel-Generierung',
+ hint: 'Session-Titel'
+ },
+ review: {
+ label: 'Review',
+ hint: '/review Bewertungs-Subagent'
+ },
+ triage_specifier: {
+ label: 'Triage-Spezifizierer',
+ hint: 'Kanban-Spezifikation ausarbeiten'
+ },
+ kanban_decomposer: {
+ label: 'Kanban-Zerleger',
+ hint: 'Aufgaben zerlegen'
+ },
+ profile_describer: {
+ label: 'Profil-Beschreiber',
+ hint: 'Automatische Profilbeschreibungen'
+ },
+ curator: {
+ label: 'Kurator',
+ hint: 'Skill-Nutzungs-Review'
+ }
+}
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index c42453c366e..d0541294d52 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -1,5 +1,6 @@
import { FIELD_DESCRIPTIONS, FIELD_LABELS } from '@/app/settings/constants'
+import { enAuxTasks } from './en_aux_tasks'
import { enModelMenu } from './en_model_menu'
import type { Translations } from './types'
@@ -1811,19 +1812,7 @@ export const en: Translations = {
moaAggregator: 'Aggregator',
moaAggregatorBilled: 'acting model · billed for the run',
moaReferenceHint: 'advises once per turn by default',
- tasks: {
- vision: { label: 'Vision', hint: 'Image analysis' },
- compression: { label: 'Compression', hint: 'Context compaction' },
- skills_hub: { label: 'Skills hub', hint: 'Skill search' },
- approval: { label: 'Approval', hint: 'Smart auto-approve' },
- mcp: { label: 'MCP', hint: 'MCP tool routing' },
- title_generation: { label: 'Title gen', hint: 'Session titles' },
- review: { label: 'Review', hint: '/review reviewer subagent' },
- triage_specifier: { label: 'Triage specifier', hint: 'Kanban spec fleshing' },
- kanban_decomposer: { label: 'Kanban decomposer', hint: 'Task decomposition' },
- profile_describer: { label: 'Profile describer', hint: 'Auto profile descriptions' },
- curator: { label: 'Curator', hint: 'Skill-usage review' }
- }
+ tasks: enAuxTasks
},
localModels: {
connectionChanged: 'Local models connection changed',
diff --git a/apps/desktop/src/i18n/en_aux_tasks.ts b/apps/desktop/src/i18n/en_aux_tasks.ts
new file mode 100644
index 00000000000..8ac79fb8652
--- /dev/null
+++ b/apps/desktop/src/i18n/en_aux_tasks.ts
@@ -0,0 +1,15 @@
+import type { AuxTaskCopyMap } from './types_aux_tasks'
+
+export const enAuxTasks: AuxTaskCopyMap = {
+ vision: { label: 'Vision', hint: 'Image analysis' },
+ compression: { label: 'Compression', hint: 'Context compaction' },
+ skills_hub: { label: 'Skills hub', hint: 'Skill search' },
+ approval: { label: 'Approval', hint: 'Smart auto-approve' },
+ mcp: { label: 'MCP', hint: 'MCP tool routing' },
+ title_generation: { label: 'Title gen', hint: 'Session titles' },
+ review: { label: 'Review', hint: '/review reviewer subagent' },
+ triage_specifier: { label: 'Triage specifier', hint: 'Kanban spec fleshing' },
+ kanban_decomposer: { label: 'Kanban decomposer', hint: 'Task decomposition' },
+ profile_describer: { label: 'Profile describer', hint: 'Auto profile descriptions' },
+ curator: { label: 'Curator', hint: 'Skill-usage review' }
+}
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index e46d6ff643a..05a3b9c65ce 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -1,6 +1,7 @@
import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale, type TranslationOverrides } from './define-locale'
+import { esAuxTasks } from './es_aux_tasks'
import { esModelMenu } from './es_model_menu'
import { introEs } from './intro-es'
@@ -2132,52 +2133,7 @@ export const esOverrides = {
moaAggregator: 'Agregador',
moaAggregatorBilled: 'modelo que actúa · se factura por la ejecución',
moaReferenceHint: 'asesora una vez por turno por defecto',
- tasks: {
- vision: {
- label: 'Visión',
- hint: 'Análisis de imágenes'
- },
- compression: {
- label: 'Compresión',
- hint: 'Compactación de contexto'
- },
- skills_hub: {
- label: 'Hub de skills',
- hint: 'Búsqueda de skills'
- },
- approval: {
- label: 'Aprobación',
- hint: 'Aprobación automática inteligente'
- },
- mcp: {
- label: 'MCP',
- hint: 'Enrutamiento de herramientas MCP'
- },
- title_generation: {
- label: 'Generación de títulos',
- hint: 'Títulos de sesión'
- },
- review: {
- label: 'Revisión',
- hint: 'subagente revisor de /review'
- },
- triage_specifier: {
- label: 'Especificador de triaje',
- hint: 'Detalle de especificaciones de Kanban'
- },
- kanban_decomposer: {
- label: 'Descomponedor de Kanban',
- hint: 'Descomposición de tareas'
- },
- profile_describer: {
- label: 'Descriptor de perfiles',
- hint: 'Descripciones automáticas de perfiles'
- },
- curator: {
- label: 'Curador',
- hint: 'Revisión de uso de skills'
- }
- }
+ tasks: esAuxTasks
},
localModels: {
connectionChanged: 'Cambió la conexión de los modelos locales',
diff --git a/apps/desktop/src/i18n/es_aux_tasks.ts b/apps/desktop/src/i18n/es_aux_tasks.ts
new file mode 100644
index 00000000000..ecbff609add
--- /dev/null
+++ b/apps/desktop/src/i18n/es_aux_tasks.ts
@@ -0,0 +1,48 @@
+import type { AuxTaskCopyMap } from './types_aux_tasks'
+
+export const esAuxTasks: AuxTaskCopyMap = {
+ vision: {
+ label: 'Visión',
+ hint: 'Análisis de imágenes'
+ },
+ compression: {
+ label: 'Compresión',
+ hint: 'Compactación de contexto'
+ },
+ skills_hub: {
+ label: 'Hub de skills',
+ hint: 'Búsqueda de skills'
+ },
+ approval: {
+ label: 'Aprobación',
+ hint: 'Aprobación automática inteligente'
+ },
+ mcp: {
+ label: 'MCP',
+ hint: 'Enrutamiento de herramientas MCP'
+ },
+ title_generation: {
+ label: 'Generación de títulos',
+ hint: 'Títulos de sesión'
+ },
+ review: {
+ label: 'Revisión',
+ hint: 'subagente revisor de /review'
+ },
+ triage_specifier: {
+ label: 'Especificador de triaje',
+ hint: 'Detalle de especificaciones de Kanban'
+ },
+ kanban_decomposer: {
+ label: 'Descomponedor de Kanban',
+ hint: 'Descomposición de tareas'
+ },
+ profile_describer: {
+ label: 'Descriptor de perfiles',
+ hint: 'Descripciones automáticas de perfiles'
+ },
+ curator: {
+ label: 'Curador',
+ hint: 'Revisión de uso de skills'
+ }
+}
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index f22ed231cfc..a23db0f20b8 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -1,6 +1,7 @@
import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale, type TranslationOverrides } from './define-locale'
+import { frAuxTasks } from './fr_aux_tasks'
import { frModelMenu } from './fr_model_menu'
import { introFr } from './intro-fr'
@@ -2145,52 +2146,7 @@ export const frOverrides = {
moaAggregator: 'Agrégateur',
moaAggregatorBilled: "modèle actif · facturé pour l'exécution",
moaReferenceHint: 'donne un avis une fois par tour par défaut',
- tasks: {
- vision: {
- label: 'Vision',
- hint: "Analyse d'image"
- },
- compression: {
- label: 'Compression',
- hint: 'Compaction de contexte'
- },
- skills_hub: {
- label: 'Hub de skills',
- hint: 'Recherche de skills'
- },
- approval: {
- label: 'Approbation',
- hint: 'Auto-approbation intelligente'
- },
- mcp: {
- label: 'MCP',
- hint: "Routage d'outils MCP"
- },
- title_generation: {
- label: 'Génération de titre',
- hint: 'Titres de session'
- },
- review: {
- label: 'Révision',
- hint: 'Sous-agent de révision /review'
- },
- triage_specifier: {
- label: 'Précision du triage',
- hint: 'Détail des spécifications Kanban'
- },
- kanban_decomposer: {
- label: 'Décomposition Kanban',
- hint: 'Décomposition des tâches'
- },
- profile_describer: {
- label: 'Description de profil',
- hint: 'Descriptions automatiques des profils'
- },
- curator: {
- label: 'Curateur',
- hint: "Revue d'utilisation des skills"
- }
- }
+ tasks: frAuxTasks
},
localModels: {
connectionChanged: 'La connexion des modèles locaux a changé',
diff --git a/apps/desktop/src/i18n/fr_aux_tasks.ts b/apps/desktop/src/i18n/fr_aux_tasks.ts
new file mode 100644
index 00000000000..f81be16503e
--- /dev/null
+++ b/apps/desktop/src/i18n/fr_aux_tasks.ts
@@ -0,0 +1,48 @@
+import type { AuxTaskCopyMap } from './types_aux_tasks'
+
+export const frAuxTasks: AuxTaskCopyMap = {
+ vision: {
+ label: 'Vision',
+ hint: "Analyse d'image"
+ },
+ compression: {
+ label: 'Compression',
+ hint: 'Compaction de contexte'
+ },
+ skills_hub: {
+ label: 'Hub de skills',
+ hint: 'Recherche de skills'
+ },
+ approval: {
+ label: 'Approbation',
+ hint: 'Auto-approbation intelligente'
+ },
+ mcp: {
+ label: 'MCP',
+ hint: "Routage d'outils MCP"
+ },
+ title_generation: {
+ label: 'Génération de titre',
+ hint: 'Titres de session'
+ },
+ review: {
+ label: 'Révision',
+ hint: 'Sous-agent de révision /review'
+ },
+ triage_specifier: {
+ label: 'Précision du triage',
+ hint: 'Détail des spécifications Kanban'
+ },
+ kanban_decomposer: {
+ label: 'Décomposition Kanban',
+ hint: 'Décomposition des tâches'
+ },
+ profile_describer: {
+ label: 'Description de profil',
+ hint: 'Descriptions automatiques des profils'
+ },
+ curator: {
+ label: 'Curateur',
+ hint: "Revue d'utilisation des skills"
+ }
+}
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 9411e82d0ec..295d9dca00b 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -2,6 +2,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale } from './define-locale'
import { introJa } from './intro-ja'
+import { jaAuxTasks } from './ja_aux_tasks'
import { jaModelMenu } from './ja_model_menu'
import { jaPluginSettings } from './ja_plugins'
@@ -1338,19 +1339,7 @@ export const ja = defineLocale({
inheritsFrom: task => `${task} を継承`,
followTask: task => `${task} に従う`,
providerDefault: '(プロバイダーのデフォルト)',
- tasks: {
- vision: { label: 'ビジョン', hint: '画像分析' },
- compression: { label: '圧縮', hint: 'コンテキストの圧縮' },
- skills_hub: { label: 'スキルハブ', hint: 'スキル検索' },
- approval: { label: '承認', hint: 'スマート自動承認' },
- mcp: { label: 'MCP', hint: 'MCP ツールルーティング' },
- title_generation: { label: 'タイトル生成', hint: 'セッションタイトル' },
- review: { label: 'レビュー', hint: '/review レビューサブエージェント' },
- triage_specifier: { label: 'トリアージ指定', hint: 'カンバン仕様の具体化' },
- kanban_decomposer: { label: 'カンバン分解', hint: 'タスク分解' },
- profile_describer: { label: 'プロファイル記述', hint: 'プロファイル概要の自動生成' },
- curator: { label: 'キュレーター', hint: 'スキル使用レビュー' }
- }
+ tasks: jaAuxTasks
},
localModels: {
connectionChanged: 'ローカルモデルの接続が変更されました',
diff --git a/apps/desktop/src/i18n/ja_aux_tasks.ts b/apps/desktop/src/i18n/ja_aux_tasks.ts
new file mode 100644
index 00000000000..f3a80de3717
--- /dev/null
+++ b/apps/desktop/src/i18n/ja_aux_tasks.ts
@@ -0,0 +1,15 @@
+import type { AuxTaskCopyMap } from './types_aux_tasks'
+
+export const jaAuxTasks: AuxTaskCopyMap = {
+ vision: { label: 'ビジョン', hint: '画像分析' },
+ compression: { label: '圧縮', hint: 'コンテキストの圧縮' },
+ skills_hub: { label: 'スキルハブ', hint: 'スキル検索' },
+ approval: { label: '承認', hint: 'スマート自動承認' },
+ mcp: { label: 'MCP', hint: 'MCP ツールルーティング' },
+ title_generation: { label: 'タイトル生成', hint: 'セッションタイトル' },
+ review: { label: 'レビュー', hint: '/review レビューサブエージェント' },
+ triage_specifier: { label: 'トリアージ指定', hint: 'カンバン仕様の具体化' },
+ kanban_decomposer: { label: 'カンバン分解', hint: 'タスク分解' },
+ profile_describer: { label: 'プロファイル記述', hint: 'プロファイル概要の自動生成' },
+ curator: { label: 'キュレーター', hint: 'スキル使用レビュー' }
+}
diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.ts
index 2edb0a337df..ec14e801df6 100644
--- a/apps/desktop/src/i18n/ru.ts
+++ b/apps/desktop/src/i18n/ru.ts
@@ -1,6 +1,7 @@
import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale } from './define-locale'
+import { ruAuxTasks } from './ru_aux_tasks'
import { ruModelMenu } from './ru_model_menu'
import { ruPluginSettings } from './ru_plugins'
@@ -1461,15 +1462,7 @@ export const ru = defineLocale({
fallbackEmpty: 'Запасных моделей нет — используется модель по умолчанию, если она не падает.',
notInCatalog: 'нет в списке моделей этого провайдера — вызовы могут уходить на запасную.',
moaTitle: 'Смесь агентов',
- tasks: {
- vision: { label: 'Зрение', hint: 'Анализ изображений' },
- compression: { label: 'Сжатие', hint: 'Компрессия контекста' },
- skills_hub: { label: 'Хаб навыков', hint: 'Поиск навыков' },
- approval: { label: 'Одобрение', hint: 'Умное авто-одобрение' },
- mcp: { label: 'MCP', hint: 'Маршрутизация MCP-инструментов' },
- title_generation: { label: 'Ген. заголовка', hint: 'Заголовки сеансов' },
- curator: { label: 'Куратор', hint: 'Просмотр использования навыков' }
- }
+ tasks: ruAuxTasks
},
providers: {
connectAccount: 'Подключить аккаунт',
diff --git a/apps/desktop/src/i18n/ru_aux_tasks.ts b/apps/desktop/src/i18n/ru_aux_tasks.ts
new file mode 100644
index 00000000000..4dc81cd5279
--- /dev/null
+++ b/apps/desktop/src/i18n/ru_aux_tasks.ts
@@ -0,0 +1,11 @@
+import type { AuxTaskCopyMap } from './types_aux_tasks'
+
+export const ruAuxTasks: AuxTaskCopyMap = {
+ vision: { label: 'Зрение', hint: 'Анализ изображений' },
+ compression: { label: 'Сжатие', hint: 'Компрессия контекста' },
+ skills_hub: { label: 'Хаб навыков', hint: 'Поиск навыков' },
+ approval: { label: 'Одобрение', hint: 'Умное авто-одобрение' },
+ mcp: { label: 'MCP', hint: 'Маршрутизация MCP-инструментов' },
+ title_generation: { label: 'Ген. заголовка', hint: 'Заголовки сеансов' },
+ curator: { label: 'Куратор', hint: 'Просмотр использования навыков' }
+}
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index f1f94ff2286..755bc55a1fc 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -8,6 +8,7 @@
import type { ErrorCodeKey } from '@/lib/error-surface'
import type { TipId } from '@/lib/tips/catalog'
+import type { AuxTaskCopyMap } from './types_aux_tasks'
import type { ModelMenuTranslations } from './types_model_menu'
/** The locales compiled into the app (`TRANSLATIONS`). */
@@ -62,11 +63,6 @@ interface ModeOptionCopy {
description: string
}
-interface AuxTaskCopy {
- label: string
- hint: string
-}
-
export interface Translations {
/** Shared-metrics consent: first-run dialog + Settings › Safety toggles. */
sharedMetrics: {
@@ -1532,7 +1528,7 @@ export interface Translations {
moaAggregator: string
moaAggregatorBilled: string
moaReferenceHint: string
- tasks: Record<string, AuxTaskCopy>
+ tasks: AuxTaskCopyMap
}
localModels: {
connectionChanged: string
diff --git a/apps/desktop/src/i18n/types_aux_tasks.ts b/apps/desktop/src/i18n/types_aux_tasks.ts
new file mode 100644
index 00000000000..ef62768be9b
--- /dev/null
+++ b/apps/desktop/src/i18n/types_aux_tasks.ts
@@ -0,0 +1,8 @@
+/** Copy for one built-in auxiliary-model slot row (Settings → Models → Auxiliary models). */
+export interface AuxTaskCopy {
+ label: string
+ hint: string
+}
+
+/** Built-in slot key → row copy; plugin slots bring their own label/hint from the backend. */
+export type AuxTaskCopyMap = Record<string, AuxTaskCopy>
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 6c453897617..49ab8a7a84c 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -2,6 +2,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale } from './define-locale'
import { introZh } from './intro-zh'
+import { zhAuxTasks } from './zh_aux_tasks'
import { zhModelMenu } from './zh_model_menu'
export const zh = defineLocale({
@@ -1738,19 +1739,7 @@ export const zh = defineLocale({
moaAggregator: '聚合模型',
moaAggregatorBilled: '执行模型 · 整个运行在此计费',
moaReferenceHint: '默认每轮仅建议一次',
- tasks: {
- vision: { label: '视觉', hint: '图片分析' },
- compression: { label: '压缩', hint: '上下文压缩' },
- skills_hub: { label: '技能中心', hint: '技能搜索' },
- approval: { label: '审批', hint: '智能自动批准' },
- mcp: { label: 'MCP', hint: 'MCP 工具路由' },
- title_generation: { label: '标题生成', hint: '会话标题' },
- review: { label: '评审', hint: '/review 评审子智能体' },
- triage_specifier: { label: '分类指定', hint: '看板任务规格补全' },
- kanban_decomposer: { label: '看板分解', hint: '任务拆解' },
- profile_describer: { label: '配置描述', hint: '自动生成配置描述' },
- curator: { label: '维护器', hint: '技能使用审查' }
- }
+ tasks: zhAuxTasks
},
localModels: {
connectionChanged: '本地模型连接已更改',
diff --git a/apps/desktop/src/i18n/zh_aux_tasks.ts b/apps/desktop/src/i18n/zh_aux_tasks.ts
new file mode 100644
index 00000000000..66b4df7cba6
--- /dev/null
+++ b/apps/desktop/src/i18n/zh_aux_tasks.ts
@@ -0,0 +1,15 @@
+import type { AuxTaskCopyMap } from './types_aux_tasks'
+
+export const zhAuxTasks: AuxTaskCopyMap = {
+ vision: { label: '视觉', hint: '图片分析' },
+ compression: { label: '压缩', hint: '上下文压缩' },
+ skills_hub: { label: '技能中心', hint: '技能搜索' },
+ approval: { label: '审批', hint: '智能自动批准' },
+ mcp: { label: 'MCP', hint: 'MCP 工具路由' },
+ title_generation: { label: '标题生成', hint: '会话标题' },
+ review: { label: '评审', hint: '/review 评审子智能体' },
+ triage_specifier: { label: '分类指定', hint: '看板任务规格补全' },
+ kanban_decomposer: { label: '看板分解', hint: '任务拆解' },
+ profile_describer: { label: '配置描述', hint: '自动生成配置描述' },
+ curator: { label: '维护器', hint: '技能使用审查' }
+}
diff --git a/hermes_cli/plugins.py b/hermes_cli/plugins.py
index cd13d8de895..a806686f860 100644
--- a/hermes_cli/plugins.py
+++ b/hermes_cli/plugins.py
@@ -864,42 +864,11 @@ class PluginContext:
``defaults``, then user config in ``auxiliary.<key>``). An unknown or self-referential
``inherit_from`` logs a warning and registers the task without inheritance.
Raises ``ValueError`` for an empty/invalid key, a built-in key, or another plugin's key."""
- me = self.manifest.name
- if not key or not isinstance(key, str):
- raise ValueError(f"Plugin '{me}' tried to register auxiliary task with invalid key {key!r}")
- if not all(c.isalnum() or c == "_" for c in key):
- raise ValueError(f"Plugin '{me}' auxiliary task key {key!r} "
- f"must contain only alphanumeric characters and underscores")
- from hermes_cli.main_provider_setup import _AUX_TASKS as _BUILTIN_AUX_TASKS
- builtin_aux_keys = {k for k, _name, _desc in _BUILTIN_AUX_TASKS}
- if key in builtin_aux_keys:
- raise ValueError(f"Plugin '{me}' cannot register auxiliary task {key!r} — that key is reserved "
- f"for a built-in task. Pick a plugin-namespaced key (e.g. '{me}_{key}').")
- # Owner is the canonical id ``ctx.llm`` is bound to, so agent/plugin_llm.py can match it.
- owner_id = self.plugin_id
+ from hermes_cli.plugins_aux_tasks import build_auxiliary_task_entry
existing = self._manager._aux_tasks.get(key)
- if existing is not None and existing.get("plugin") != owner_id:
- raise ValueError(f"Plugin '{me}' cannot register auxiliary task {key!r} — already registered "
- f"by plugin '{existing.get('plugin')}'")
- # A bad base degrades to "no inheritance" rather than failing the whole plugin load; a
- # self-reference would otherwise only surface at read time, as a cycle.
- if inherit_from is not None and (
- not isinstance(inherit_from, str) or inherit_from == key
- or (inherit_from not in builtin_aux_keys and inherit_from not in self._manager._aux_tasks)):
- logger.warning("Plugin '%s' auxiliary task %r: ignoring inherit_from=%r — not a built-in "
- "auxiliary task or one already registered by a plugin", me, key, inherit_from)
- inherit_from = None
- # Plugin owns the schema; routing fields are guaranteed present so consumers don't crash.
- # With inheritance the base supplies the shape, so only the plugin's own overrides go here.
- task_defaults = (dict(defaults or {}) if inherit_from else
- {"provider": "auto", "model": "", "base_url": "", "api_key": "", "timeout": 60,
- "extra_body": {}, **(defaults or {})})
- entry = {
- "key": key, "display_name": display_name, "description": description,
- "defaults": task_defaults,
- "inherit_from": inherit_from,
- "plugin": owner_id, "plugin_key": owner_id,
- }
+ entry = build_auxiliary_task_entry(
+ self.manifest.name, self.plugin_id, key, display_name=display_name, description=description,
+ defaults=defaults, inherit_from=inherit_from, registered=self._manager._aux_tasks)
return self._register_entry("auxiliary_task", key, self._manager._aux_tasks, entry,
"Plugin %s registered auxiliary task: %s (%s)", key, display_name,
previous=existing)
diff --git a/hermes_cli/plugins_aux_tasks.py b/hermes_cli/plugins_aux_tasks.py
new file mode 100644
index 00000000000..f76092c0762
--- /dev/null
+++ b/hermes_cli/plugins_aux_tasks.py
@@ -0,0 +1,54 @@
+"""Validation and entry shape for ``PluginContext.register_auxiliary_task``."""
+
+from __future__ import annotations
+
+import logging
+from typing import Any, Dict, Optional
+
+logger = logging.getLogger("hermes_cli.plugins")
+
+
+def build_auxiliary_task_entry(
+ me: str, owner_id: str, key: str, *, display_name: str, description: str,
+ defaults: Optional[Dict[str, Any]], inherit_from: Optional[str], registered: Dict[str, Dict[str, Any]],
+) -> Dict[str, Any]:
+ """Registry entry for a plugin auxiliary task, or ``ValueError`` for a bad key.
+
+ ``me`` is the manifest name (for messages); ``owner_id`` is the canonical id ``ctx.llm`` is
+ bound to, so agent/plugin_llm.py can match it. ``registered`` is the manager's current
+ ``_aux_tasks`` (re-registration by the same owner is allowed).
+ """
+ if not key or not isinstance(key, str):
+ raise ValueError(f"Plugin '{me}' tried to register auxiliary task with invalid key {key!r}")
+ if not all(c.isalnum() or c == "_" for c in key):
+ raise ValueError(f"Plugin '{me}' auxiliary task key {key!r} "
+ f"must contain only alphanumeric characters and underscores")
+ from hermes_cli.main_provider_setup import _AUX_TASKS as _BUILTIN_AUX_TASKS
+ builtin_aux_keys = {k for k, _name, _desc in _BUILTIN_AUX_TASKS}
+ if key in builtin_aux_keys:
+ raise ValueError(f"Plugin '{me}' cannot register auxiliary task {key!r} — that key is reserved "
+ f"for a built-in task. Pick a plugin-namespaced key (e.g. '{me}_{key}').")
+ existing = registered.get(key)
+ if existing is not None and existing.get("plugin") != owner_id:
+ raise ValueError(f"Plugin '{me}' cannot register auxiliary task {key!r} — already registered "
+ f"by plugin '{existing.get('plugin')}'")
+ # A bad base degrades to "no inheritance" rather than failing the whole plugin load; a
+ # self-reference would otherwise only surface at read time, as a cycle.
+ if inherit_from is not None and (
+ not isinstance(inherit_from, str) or inherit_from == key
+ or (inherit_from not in builtin_aux_keys and inherit_from not in registered)):
+ logger.warning("Plugin '%s' auxiliary task %r: ignoring inherit_from=%r — not a built-in "
+ "auxiliary task or one already registered by a plugin", me, key, inherit_from)
+ inherit_from = None
+ # Plugin owns the schema; routing fields are guaranteed present so consumers don't crash.
+ # With inheritance the base supplies the shape, so only the plugin's own overrides go here.
+ task_defaults = (dict(defaults or {}) if inherit_from else
+ {"provider": "auto", "model": "", "base_url": "", "api_key": "", "timeout": 60,
+ "extra_body": {}, **(defaults or {})})
+ entry = {
+ "key": key, "display_name": display_name, "description": description,
+ "defaults": task_defaults,
+ "inherit_from": inherit_from,
+ "plugin": owner_id, "plugin_key": owner_id,
+ }
+ return entry
diff --git a/hermes_cli/web_server_config.py b/hermes_cli/web_server_config.py
index c6cdfc7f689..1847ecc319b 100644
--- a/hermes_cli/web_server_config.py
+++ b/hermes_cli/web_server_config.py
@@ -567,7 +567,7 @@ def _plugin_aux_tasks() -> List[Dict[str, Any]]:
from hermes_cli.plugins import get_plugin_auxiliary_tasks
return [dict(entry) for entry in get_plugin_auxiliary_tasks()
if entry.get("key") and entry["key"] not in _AUX_TASK_SLOTS]
- except Exception:
+ except Exception: # health: allow BLE001 -- plugin discovery must never break the built-in slots
_log.debug("plugin auxiliary task lookup failed", exc_info=True)
return []
diff --git a/tests/hermes_cli/test_plugin_auxiliary_tasks.py b/tests/hermes_cli/test_plugin_auxiliary_tasks.py
index bbdad85e43a..a4ec1b7e491 100644
--- a/tests/hermes_cli/test_plugin_auxiliary_tasks.py
+++ b/tests/hermes_cli/test_plugin_auxiliary_tasks.py
@@ -178,6 +178,6 @@ def test_inheritance_cycle_does_not_recurse(aux_home, patched_manager, caplog):
_register(patched_manager, "plug_b", inherit_from="plug_a")
_register(patched_manager, "plug_a", inherit_from="plug_b", defaults={"timeout": 90})
- with caplog.at_level(logging.WARNING, logger="agent.auxiliary_client"):
+ with caplog.at_level(logging.WARNING, logger="agent.auxiliary_task_config"):
assert resolve("plug_a")["timeout"] == 90
assert "circular inherit_from" in caplog.text
diff --git a/web/src/lib/api-aux.ts b/web/src/lib/api-aux.ts
new file mode 100644
index 00000000000..b8c0bfd9219
--- /dev/null
+++ b/web/src/lib/api-aux.ts
@@ -0,0 +1,23 @@
+/** Wire types for GET /api/model/auxiliary (built-in + plugin-registered aux slots). */
+
+export interface AuxiliaryTaskAssignment {
+ task: string;
+ provider: string;
+ model: string;
+ base_url: string;
+ /** Set only on plugin-registered tasks (PluginContext.register_auxiliary_task):
+ * the plugin's display name / description / owning plugin id. Built-in tasks
+ * are labelled client-side. Absent on older backends. */
+ label?: string;
+ hint?: string;
+ plugin?: string;
+ /** Plugin tasks only: the slot this one follows until it is pinned itself. */
+ inherit_from?: string | null;
+ /** Inheriting plugin tasks only: the route the task resolves to right now. */
+ effective?: { provider: string; model: string; base_url: string };
+}
+
+export interface AuxiliaryModelsResponse {
+ tasks: AuxiliaryTaskAssignment[];
+ main: { provider: string; model: string };
+}
diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts
index 935ac8e7ae2..380ddd74633 100644
--- a/web/src/lib/api.ts
+++ b/web/src/lib/api.ts
@@ -4,6 +4,7 @@ import {
type ModelOptionsResult,
} from "@hermes/shared";
+import type { AuxiliaryModelsResponse } from "./api-aux";
import { dashboardServingProfile } from "./profile-bootstrap";
// The dashboard can be served either at the root of its host (e.g.
@@ -2597,27 +2598,7 @@ export interface ModelInfoResponse {
export type { ModelOptionProvider, ModelOptionsResult };
-export interface AuxiliaryTaskAssignment {
- task: string;
- provider: string;
- model: string;
- base_url: string;
- /** Set only on plugin-registered tasks (PluginContext.register_auxiliary_task):
- * the plugin's display name / description / owning plugin id. Built-in tasks
- * are labelled client-side. Absent on older backends. */
- label?: string;
- hint?: string;
- plugin?: string;
- /** Plugin tasks only: the slot this one follows until it is pinned itself. */
- inherit_from?: string | null;
- /** Inheriting plugin tasks only: the route the task resolves to right now. */
- effective?: { provider: string; model: string; base_url: string };
-}
-
-export interface AuxiliaryModelsResponse {
- tasks: AuxiliaryTaskAssignment[];
- main: { provider: string; model: string };
-}
+export type { AuxiliaryModelsResponse, AuxiliaryTaskAssignment } from "./api-aux";
export interface MoaModelSlot {
provider: string;