- app/agents/: new Agents page showing per-agent status + workspace files - app/knowledge/: Knowledge base viewer - app/api/tiger/: proxy routes for cron, file-tasks, file-projects, keys, agents - components/agent-strip.tsx: agent status bar for dashboard home - components/command-bar.tsx: command palette - components/digest-card.tsx + schedule-card.tsx: weekly digest + cron schedule - components/status-footer.tsx: system status footer - tasks page: dual-source (TASKS.md JSON block + SQLite) with fallback - projects page: PROJECTS.md reader with kanban board integration
21 lines
721 B
TypeScript
21 lines
721 B
TypeScript
// POST /api/tiger/bridge-restart — restart the tiger-bridge systemd service
|
|
// Responds immediately, then triggers the restart with a short delay so the
|
|
// HTTP response is fully written before the process exits.
|
|
import { NextResponse } from "next/server";
|
|
import { exec } from "child_process";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function POST() {
|
|
// Schedule restart after response is flushed
|
|
setTimeout(() => {
|
|
exec("systemctl restart tiger-bridge", (err) => {
|
|
if (err) console.error("[bridge-restart] systemctl failed:", err.message);
|
|
});
|
|
}, 600);
|
|
|
|
return NextResponse.json({
|
|
ok: true,
|
|
message: "Bridge restart initiated. Dashboard will reconnect in ~5s.",
|
|
});
|
|
}
|