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
// The docked preview's width: the one wanted, kept between the preview's least and what leaves the
// conversation its room beside the task list.
jest.mock('./preview-grip.css', () => ({}), { virtual: true });
import { CONVO_MIN, fitPreview, PREVIEW_DEFAULT, PREVIEW_MIN, previewMax } from './PreviewGrip';
test('the width wanted, while it fits', () => {
expect(fitPreview(700, 1600)).toBe(700);
expect(fitPreview(PREVIEW_DEFAULT, 0)).toBe(PREVIEW_DEFAULT); // not measured yet
});
test('never narrower than the preview’s least', () => {
expect(fitPreview(100, 1600)).toBe(PREVIEW_MIN);
});
test('never so wide the conversation loses its room', () => {
const room = 1400;
expect(previewMax(room)).toBe(room - 300 - CONVO_MIN);
expect(fitPreview(1200, room)).toBe(room - 300 - CONVO_MIN);
// a window too narrow for both keeps the preview at its least
expect(fitPreview(900, 900)).toBe(PREVIEW_MIN);
});
test('nothing kept, or nonsense kept, is the first width', () => {
expect(fitPreview(NaN, 1600)).toBe(PREVIEW_DEFAULT);
expect(fitPreview(0, 1600)).toBe(PREVIEW_DEFAULT);
});