fleet(tower): 0.18 — Tasks-View (Spool/Dead-Letter/Alarm) + Task-Detail-Modal + /healthz + /api/status; Fleet-Views 0.13-0.18 erstmals versioniert
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { NextResponse } from "next/server"
|
||||
import { mcpCallTool, FLEET_BOARD_MCP_URL } from "@/app/lib/fleet/fleetSource"
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
/**
|
||||
* GET /api/fleet/owner/inbox — Owner-Inbox (NAR-Verfahren §1.3):
|
||||
* Alle Tasks an 'tower-owner' via board-service list_owner_inbox.
|
||||
* status=submitted = wartet auf Owner-Entscheidung.
|
||||
*/
|
||||
export async function GET() {
|
||||
try {
|
||||
const res = await mcpCallTool(FLEET_BOARD_MCP_URL, "list_owner_inbox", {})
|
||||
if (!res.ok) {
|
||||
return NextResponse.json({ error: `list_owner_inbox: ${res.error}` }, { status: 500 })
|
||||
}
|
||||
const payload = typeof res.data === "string" ? JSON.parse(res.data) : res.data
|
||||
return NextResponse.json(payload, { headers: { "Cache-Control": "no-store" } })
|
||||
} catch (err) {
|
||||
return NextResponse.json(
|
||||
{ error: `OWNER_INBOX_FAILED: ${err instanceof Error ? err.message : String(err)}` },
|
||||
{ status: 500 }
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user