HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
feat(console): the harness tree groups Your harnesses above System harnesses, each a collapsible group with its count
richard-epsilla8221f47d4fea
diff --git a/ui/src/app/(app)/harnesses/page.tsx b/ui/src/app/(app)/harnesses/page.tsxindex 9675144b..95fc6973 100644--- a/ui/src/app/(app)/harnesses/page.tsx+++ b/ui/src/app/(app)/harnesses/page.tsx@@ -68,6 +68,16 @@ export default function HarnessesPage() {const [custom, setCustom] = useState<CustomHarness[]>([]);const [rows, setRows] = useState<HarnessRow[] | null>(null);+ // the two groups of the tree, yours first and the system's below; collapse is a per-viewer convenience+ const [groupsOpen, setGroupsOpen] = useState<{ yours: boolean; system: boolean }>(() => {+ try { const v = typeof window !== 'undefined' ? window.localStorage.getItem('hx.groups') : null; if (v) return JSON.parse(v); } catch { /* fresh */ }+ return { yours: true, system: true };+ });+ const toggleGroup = (g: 'yours' | 'system') => setGroupsOpen((prev) => {+ const next = { ...prev, [g]: !prev[g] };+ try { window.localStorage.setItem('hx.groups', JSON.stringify(next)); } catch { /* private mode */ }+ return next;+ });const [cards, setCards] = useState<TraceCard[]>([]);const [q, setQ] = useState('');// One harness is expanded at a time (an accordion), so the task refresh has one folder to keep@@ -190,47 +200,59 @@ export default function HarnessesPage() {<div className="hx-side-scroll">{!rows ? <SkelListItems rows={4} /> : panel.length === 0 ? (<div className="hx-empty">{needle ? 'Nothing matches that.' : 'No harnesses yet.'}</div>- ) : panel.map(({ r, tasks, loaded, more, loading }) => {+ ) : ([+ { key: 'yours' as const, label: 'Your harnesses', items: panel.filter((x) => x.r.kind !== 'builtin'), empty: needle ? '' : 'None yet. Fork a system harness, or create one from the dashboard.' },+ { key: 'system' as const, label: 'System harnesses', items: panel.filter((x) => x.r.kind === 'builtin'), empty: '' },+ ]).map((g) => (+ <div key={g.key} className={'hx-group' + (groupsOpen[g.key] || needle ? ' is-open' : '')}>+ <button type="button" className="hx-group-btn" aria-expanded={groupsOpen[g.key] || !!needle} onClick={() => toggleGroup(g.key)}>+ <iconify-icon icon={groupsOpen[g.key] || needle ? 'tabler:chevron-down' : 'tabler:chevron-right'} className="hx-caret"></iconify-icon>+ <span className="hx-group-label">{g.label}</span>+ <span className="hx-group-count">{g.items.length}</span>+ </button>+ {(groupsOpen[g.key] || !!needle) && (g.items.length === 0 ? (g.empty ? <div className="hx-group-empty">{g.empty}</div> : null) : g.items.map(({ r, tasks, loaded, more, loading }) => {const isOpen = open === r.id || !!needle;- const running = tasks.filter((c) => RUNNING.has(c.status || '')).length;- return (- <div key={r.id} className={'hx-proj' + (r.id === h ? ' is-current' : '')}>- <div className="hx-proj-row">- <button type="button" className="hx-proj-btn" aria-expanded={isOpen} onClick={() => toggle(r.id)}>- <iconify-icon icon={isOpen ? 'tabler:chevron-down' : 'tabler:chevron-right'} className="hx-caret"></iconify-icon>- <HarnessLogo id={r.kind === 'builtin' ? r.id : runtimeOf(r).baseId} size={14} />- <span className="hx-proj-name">{r.name}</span>- {running > 0 && <span className="hx-proj-badge" title={`${running} running`}>{running}</span>}- </button>- <button type="button" className="hx-ic" title="New task" aria-label={`New task in ${r.name}`} onClick={() => openNew(r.id)}>- <iconify-icon icon="tabler:plus"></iconify-icon>- </button>- <button type="button" className="hx-ic" title="Harness settings" aria-label={`Settings for ${r.name}`} onClick={() => openSettings(r.id)}>- <iconify-icon icon="tabler:settings"></iconify-icon>- </button>- </div>- {isOpen && (- <div className="hx-tasks">- {tasks.length === 0 ? (loaded ? <div className="hx-tasks-empty">No tasks yet</div> : null) : tasks.map((c) => {- const on = c.session_id === sid;- return (- <button key={c.session_id} type="button" className={'hx-task' + (on ? ' is-on' : '')}- aria-current={on ? 'true' : undefined} onClick={() => openTask(r.id, c.session_id)}>- <i className={'hx-dot is-' + taskState(c.status)} aria-hidden="true" />- <span>{c.title || 'Task'}</span>- </button>- );- })}- {more && (- <button type="button" className="hx-more" disabled={loading} onClick={() => void loadTasks(r.id, perHarness[r.id]?.cursor)}>- {loading ? 'Loading' : 'Load more'}- </button>- )}+ const running = tasks.filter((c) => RUNNING.has(c.status || '')).length;+ return (+ <div key={r.id} className={'hx-proj' + (r.id === h ? ' is-current' : '')}>+ <div className="hx-proj-row">+ <button type="button" className="hx-proj-btn" aria-expanded={isOpen} onClick={() => toggle(r.id)}>+ <iconify-icon icon={isOpen ? 'tabler:chevron-down' : 'tabler:chevron-right'} className="hx-caret"></iconify-icon>+ <HarnessLogo id={r.kind === 'builtin' ? r.id : runtimeOf(r).baseId} size={14} />+ <span className="hx-proj-name">{r.name}</span>+ {running > 0 && <span className="hx-proj-badge" title={`${running} running`}>{running}</span>}+ </button>+ <button type="button" className="hx-ic" title="New task" aria-label={`New task in ${r.name}`} onClick={() => openNew(r.id)}>+ <iconify-icon icon="tabler:plus"></iconify-icon>+ </button>+ <button type="button" className="hx-ic" title="Harness settings" aria-label={`Settings for ${r.name}`} onClick={() => openSettings(r.id)}>+ <iconify-icon icon="tabler:settings"></iconify-icon>+ </button></div>- )}- </div>- );- })}+ {isOpen && (+ <div className="hx-tasks">+ {tasks.length === 0 ? (loaded ? <div className="hx-tasks-empty">No tasks yet</div> : null) : tasks.map((c) => {+ const on = c.session_id === sid;+ return (+ <button key={c.session_id} type="button" className={'hx-task' + (on ? ' is-on' : '')}+ aria-current={on ? 'true' : undefined} onClick={() => openTask(r.id, c.session_id)}>+ <i className={'hx-dot is-' + taskState(c.status)} aria-hidden="true" />+ <span>{c.title || 'Task'}</span>+ </button>+ );+ })}+ {more && (+ <button type="button" className="hx-more" disabled={loading} onClick={() => void loadTasks(r.id, perHarness[r.id]?.cursor)}>+ {loading ? 'Loading' : 'Load more'}+ </button>+ )}+ </div>+ )}+ </div>+ );+ }))}+ </div>+ ))}</div></aside>diff --git a/ui/src/app/v2.css b/ui/src/app/v2.cssindex 57c4cf63..fd19bad9 100644--- a/ui/src/app/v2.css+++ b/ui/src/app/v2.css@@ -451,6 +451,15 @@ body {.hx-index.is-on { background: var(--v2-tint); color: var(--v2-ink); font-weight: 600; }.hx-index.is-on::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2.5px; border-radius: 0 2px 2px 0; background: var(--v2-accent); }.hx-div { height: 1px; margin: 8px 0 6px; background: var(--v2-div); }+/* the tree's two groups: yours first, the system's below; a quiet header with a count */+.hx-group { padding: 4px 0 2px; }+.hx-group + .hx-group { margin-top: 6px; border-top: 1px solid var(--v2-line); padding-top: 8px; }+.hx-group-btn { display: flex; align-items: center; gap: 7px; width: 100%; padding: 6px 12px 6px 14px; border: 0; background: none; cursor: pointer; color: var(--v2-sec); font: inherit; text-align: left; }+.hx-group-btn:hover { color: var(--v2-ink); }+.hx-group-btn .hx-caret { font-size: 14px; color: var(--v2-cap); flex: none; }+.hx-group-label { font-size: 13px; font-weight: 500; }+.hx-group-count { font-family: var(--v2-mono); font-size: 10.5px; color: var(--v2-cap); }+.hx-group-empty { padding: 2px 18px 8px 34px; font-size: 12px; color: var(--v2-cap); line-height: 1.5; }.hx-proj-row { display: flex; align-items: center; gap: 2px; padding: 2px 8px 2px 10px; }.hx-proj-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 6px 4px; border: 0; background: none; cursor: pointer;font: inherit; text-align: left; color: var(--v2-ink); }