sessions: operations get/list/cancel/delete/wait for engine, session, memory and serving profile; servingProfiles CRUD. registry: ListResult with truncated flag, v1alpha twins, gateway/policy operations, authz IAM, deny policy update, boundary patch/bindings. optimize: make_gemini_model over models::VertexModel (DirectModel removed), generateSyntheticData, online evaluator operations, trace/log writers. armor: SecurityAdmin for all SCC v2 methods (attack exposure excluded), documented agent threat categories, floor settings fixed to location global after live run. check_discovery.py of all four enforce coverage. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
41 lines
2.0 KiB
C++
41 lines
2.0 KiB
C++
// Routes: GET /agent/sessions (page), GET /agent/sessions/status
|
|
#include "support/GoogleRig.hpp"
|
|
|
|
using namespace molo::example::test;
|
|
|
|
int main() {
|
|
{
|
|
GoogleRig rig;
|
|
Fixture f(rig.client);
|
|
auto page = f.client->get("/agent/sessions");
|
|
check(page.status == 200, "page 200");
|
|
check(contains(page.headers.get("Content-Type"), "text/html"), "html");
|
|
check(contains(page.body, "Agent sessions and memory"), "heading");
|
|
check(contains(page.body, "/agent/sessions/memories/purge"), "lists the purge route");
|
|
check(contains(page.body, "/agent/sessions/operations/wait"), "lists the server-side wait route");
|
|
check(contains(page.body, "/agent/sessions/serving-profiles/list"), "lists serving profiles");
|
|
check(contains(page.body, "viewport"), "mobile viewport meta from the base template");
|
|
|
|
auto status = f.client->get("/agent/sessions/status");
|
|
check(status.status == 200, "status 200");
|
|
check(contains(status.headers.get("Content-Type"), "application/json"), "status is json");
|
|
check(contains(status.body, "\"configured\":true"), "configured with a credential");
|
|
check(contains(status.body, "aiplatform v1beta1"), "names the API surface");
|
|
check(contains(status.body, "\"max_top_k\":50"), "shows the top_k cap");
|
|
check(contains(status.body, "\"max_server_wait_seconds\":60"), "shows the wait cap");
|
|
check(!contains(status.body, kTestKey), "credential never shown");
|
|
check(rig.mock->send_count() == 0, "side effect: GET pages never call Google");
|
|
}
|
|
{
|
|
GoogleRig rig(false);
|
|
Fixture f(rig.client);
|
|
check(contains(f.client->get("/agent/sessions/status").body, "\"configured\":false"),
|
|
"not configured without a credential");
|
|
check(f.client->get("/agent/sessions").status == 200, "page works without a credential");
|
|
}
|
|
Fixture f;
|
|
check(f.client->post("/agent/sessions").status == 405, "post on the page is 405");
|
|
check(f.client->post("/agent/sessions/status").status == 405, "post on status is 405");
|
|
return finish("agent/sessions page");
|
|
}
|