218d12b8d7
- /cron/[id]: job details, prompt, output history from filesystem - Cron list items now link to detail pages - Skills render SKILL.md as proper markdown (headings, code, tables) - Cron output proxy reads from ~/.hermes/cron/output/
18 lines
586 B
TypeScript
18 lines
586 B
TypeScript
import { NextRequest, NextResponse } from "next/server";
|
|
|
|
const GATEWAY = process.env.HERMES_GATEWAY_URL || "http://127.0.0.1:8642";
|
|
|
|
export async function GET(_req: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
|
const { id } = await params;
|
|
try {
|
|
const res = await fetch(GATEWAY + "/api/jobs/" + id);
|
|
const data = await res.text();
|
|
return new NextResponse(data, {
|
|
status: res.status,
|
|
headers: { "content-type": "application/json" },
|
|
});
|
|
} catch {
|
|
return NextResponse.json({ error: "gateway unreachable" }, { status: 502 });
|
|
}
|
|
}
|