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 open-source repository's star count for the sidebar's "Star us on GitHub" row. Read from
// GitHub server-side and kept for ten minutes, so a thousand open consoles do not spend GitHub's
// unauthenticated rate limit (sixty an hour per address) and the browser never talks to GitHub.
// When GitHub does not answer there is no number: the row then shows no count rather than a
// remembered or invented one.
import { NextResponse } from 'next/server';
const REPO = 'HarnessRouter/harnessrouter';
const TTL_MS = 10 * 60 * 1000;
let cached: { stars: number; at: number } | null = null;
export const dynamic = 'force-dynamic';
export async function GET() {
if (cached && Date.now() - cached.at < TTL_MS) return NextResponse.json({ stars: cached.stars, repo: REPO });
try {
const r = await fetch(`https://api.github.com/repos/${REPO}`, {
headers: { accept: 'application/vnd.github+json', 'user-agent': 'harnessrouter-console' },
cache: 'no-store',
});
if (!r.ok) throw new Error(`github ${r.status}`);
const stars = Number((await r.json())?.stargazers_count);
if (!Number.isFinite(stars)) throw new Error('no count');
cached = { stars, at: Date.now() };
return NextResponse.json({ stars, repo: REPO });
} catch (e) {
// no number once the count is older than its ten minutes: a remembered count is not served as current
return NextResponse.json({ detail: e instanceof Error ? e.message : 'unavailable' }, { status: 502 });
}
}