feat: playground, CLI fingerprints, ACP support (#234, #223, #235)

- 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:
diegosouzapw
2026-03-07 10:24:43 -03:00
parent 7cb420d8e6
commit ac89069671
10 changed files with 1027 additions and 5 deletions

View 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 }
);
}
}