feat(clients): anthropic admin: Admin API, reports, managed agents table, demo and tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 07:46:48 +02:00
co-authored by Claude Sonnet 5.5
parent 2e0270c043
commit 04c2d7f20c
64 changed files with 7703 additions and 3 deletions
@@ -0,0 +1,24 @@
// Routes: GET /ai/anthropic/admin, /status, /calls (no credential needed)
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto page = f.client->get("/ai/anthropic/admin");
check(page.status == 200, "page is 200");
check(contains(page.headers.get("Content-Type"), "text/html"), "html");
check(contains(page.body, "Anthropic admin") && contains(page.body, "viewport"), "title and mobile viewport");
check(contains(page.body, "/embedded/ai_anthropic_admin.js"), "script wired");
check(f.client->post("/ai/anthropic/admin", "{}", "application/json").status == 405, "post is 405");
auto st = f.client->get("/ai/anthropic/admin/status");
check(st.status == 200 && contains(st.body, "\"admin_key\"") && contains(st.body, "\"api_version\""), "status lists the lanes");
check(!contains(st.body, "sk-ant"), "status never shows a key");
check(f.client->post("/ai/anthropic/admin/status", "{}", "application/json").status == 405, "status post is 405");
auto calls = f.client->get("/ai/anthropic/admin/calls");
check(calls.status == 200 && contains(calls.body, "organization.invites.create") &&
contains(calls.body, "usage_report.retrieve_messages"), "call table is listed");
return finish("ai/anthropic/admin/page");
}