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>
32 lines
1.3 KiB
C++
32 lines
1.3 KiB
C++
// Route: POST /agent/registry/list
|
|
#include "agent/registry/cases.hpp"
|
|
|
|
using namespace molo::example::test;
|
|
|
|
int main() {
|
|
check_google_post_route("/agent/registry/list",
|
|
"{\"kind\":\"agents\"}",
|
|
"{\"kind\":\"widgets\"}",
|
|
"unknown collection");
|
|
{
|
|
GoogleRig rig;
|
|
Fixture f(rig.client);
|
|
check(f.client->post("/agent/registry/list", "{\"kind\":\"aiApplications\"}", "application/json").status == 422,
|
|
"limit: a collection that is not listable here is 422");
|
|
check(f.client->post("/agent/registry/list", "", "application/json").status == 422, "empty body is 422");
|
|
check(f.client->post("/agent/registry/list", "{\"kind\":\"agents\",\"version\":\"v2\"}",
|
|
"application/json").status == 422,
|
|
"limit: an unknown API version is 422");
|
|
}
|
|
{
|
|
// v1alpha is accepted as input and still needs a credential.
|
|
GoogleRig rig(false);
|
|
Fixture f(rig.client);
|
|
auto res = f.client->post("/agent/registry/list", "{\"kind\":\"agents\",\"version\":\"v1alpha\"}",
|
|
"application/json");
|
|
check(res.status == 503 && contains(res.body, "google_not_configured"), "v1alpha without a credential is 503");
|
|
check(rig.mock->send_count() == 0, "side effect: no upstream traffic");
|
|
}
|
|
return finish("agent/registry/list");
|
|
}
|