feat(clients): registry: Agent Registry, Agent Gateway, Agent Identity from discovery call table
86-row call table checked against Google discovery documents, typed services, local approval ledger, live read-only tests, /agent/registry demo. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Route: POST /agent/registry/approve
|
||||
#include "agent/registry/cases.hpp"
|
||||
|
||||
using namespace molo::example::test;
|
||||
|
||||
int main() {
|
||||
check_google_post_route("/agent/registry/approve",
|
||||
"{\"name\":\"projects/test-project/locations/us-central1/agents/a1\",\"actor\":\"alice\"}",
|
||||
"{\"name\":\"agents/a1\",\"actor\":\"alice\"}",
|
||||
"short asset name");
|
||||
{
|
||||
GoogleRig rig;
|
||||
Fixture f(rig.client);
|
||||
check(f.client->post("/agent/registry/approve", "{\"name\":\"projects/test-project/locations/us-central1/agents/a1\"}", "application/json").status == 422,
|
||||
"missing actor is 422");
|
||||
check(contains(f.client->get("/agent/registry/approvals").body, "\"approvals\":[]"),
|
||||
"side effect: nothing recorded after rejected requests");
|
||||
}
|
||||
return finish("agent/registry/approve");
|
||||
}
|
||||
Reference in New Issue
Block a user