mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-21 22:52:19 +03:00
- Add model playground page to dashboard (provider/model/endpoint selectors, Monaco editor, streaming, abort) - Add CLI fingerprint matching (per-provider header/body ordering to match native CLI binaries) - Add ACP module (CLI agent discovery, process spawner, session manager, API endpoint) - Add playground to sidebar debug section with i18n support - Close #192 and #200 as stale (v1.8.1, no repro info)
This commit is contained in:
35
src/app/api/acp/agents/route.ts
Normal file
35
src/app/api/acp/agents/route.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* API Route: /api/acp/agents
|
||||
*
|
||||
* Returns the list of detected CLI agents and their availability status.
|
||||
* Used by the dashboard to show ACP transport options.
|
||||
*/
|
||||
|
||||
import { NextResponse } from "next/server";
|
||||
import { detectInstalledAgents } from "@/lib/acp";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const agents = detectInstalledAgents();
|
||||
return NextResponse.json({
|
||||
agents: agents.map((a) => ({
|
||||
id: a.id,
|
||||
name: a.name,
|
||||
binary: a.binary,
|
||||
version: a.version,
|
||||
installed: a.installed,
|
||||
providerAlias: a.providerAlias,
|
||||
protocol: a.protocol,
|
||||
})),
|
||||
available: agents.filter((a) => a.installed).length,
|
||||
total: agents.length,
|
||||
});
|
||||
} catch (error: any) {
|
||||
return NextResponse.json(
|
||||
{ error: error.message || "Failed to detect agents" },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user