feat(clients): models+runtime: close gaps (all Discovery methods wrapped, live re-verification)

models: EndpointAdmin and PublisherAdmin wrap every remaining method of the
owned resources (84 call table rows, 132 Discovery methods covered, v1beta1
twins, IAM, operations, responses, export, config, enableModel); planner
rejects undeclared body keys; VertexModel::TurnBuilder replays model turns
with every thoughtSignature; Lyria WAV mime from bytes; veo-3.1 default.
runtime: v1beta1 feedbackEntries, A2A gateway (40 rpcs), a2aTasks, task store
records, scoped operations, beta twin flag (103 rows, 214 methods covered);
checker verifies twins, a2aEndpoint patterns and coverage.
example: admin routes for both parts. SPECs: live results moved from
Unverified to Verified live (Veo, Lyria, thought signatures, v1beta1 routes).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 05:47:34 +02:00
co-authored by Claude Sonnet 5.5
parent 29d775a923
commit 8e807945a2
38 changed files with 4437 additions and 72 deletions
+21 -9
View File
@@ -54,10 +54,16 @@ Revision Revision::from_json(const Json& doc) {
}
AgentRuntime::AgentRuntime(std::shared_ptr<GoogleClient> client, CloudContext context,
Sleeper sleeper)
: Service(std::move(client), endpoints::aiplatform(context.location)),
Sleeper sleeper, bool beta)
: Service(std::move(client), beta ? endpoints::aiplatform_beta(context.location)
: endpoints::aiplatform(context.location)),
context_(std::move(context)),
sleeper_(std::move(sleeper)) {}
sleeper_(std::move(sleeper)),
beta_(beta) {}
OperationCalls AgentRuntime::operations() const {
return OperationCalls(client_, context_.location, beta_);
}
std::string AgentRuntime::name_of(const std::string& id) const {
return context_.child("reasoningEngines", id);
@@ -78,13 +84,13 @@ std::string AgentRuntime::checked_operation(const std::string& name) {
Json AgentRuntime::send(Call call, const std::string& target, const std::string& query,
const Json* body) const {
std::string path = render(call, target) + query;
return client_->request(method_of(call), endpoint_of(call, context_.location), path, body);
return client_->request(method_of(call), endpoint_of(call, context_.location, beta_), path, body);
}
std::size_t AgentRuntime::stream_call(Call call, const std::string& target, const Json& body,
const GoogleClient::EventSink& sink) const {
std::size_t n = 0;
client_->stream_json(endpoint_of(call, context_.location), render(call, target), body,
client_->stream_json(endpoint_of(call, context_.location, beta_), render(call, target), body,
[&](const Json& event) {
++n;
bool more = sink(event);
@@ -98,7 +104,7 @@ Json AgentRuntime::list_items(Call call, const std::string& parent, const std::s
if (filter.size() > RuntimeCaps::kMaxFilterChars) throw GoogleError::invalid("filter too long");
std::string path = render(call, parent) + "?pageSize=50";
if (!filter.empty()) path += "&filter=" + enc(filter);
return list_all(*client_, endpoint_of(call, context_.location), path, key,
return list_all(*client_, endpoint_of(call, context_.location, beta_), path, key,
RuntimeCaps::kMaxListPages);
}
@@ -286,21 +292,27 @@ std::vector<Revision> AgentRuntime::list_revisions(const std::string& id) const
return out;
}
Operation AgentRuntime::destroy_revision_start(const std::string& id,
const std::string& revision) const {
return Operation::from_json(send(Call::kRevisionDelete, revision_of(id, revision)));
}
Operation AgentRuntime::destroy_revision(const std::string& id, const std::string& revision) const {
return finish(Operation::from_json(send(Call::kRevisionDelete, revision_of(id, revision))));
return finish(destroy_revision_start(id, revision));
}
Json AgentRuntime::query_revision(const std::string& id, const std::string& revision,
const Json& input, const std::string& class_method) const {
Json body = query_body(input, class_method);
return send(Call::kRevisionQuery, revision_of(id, revision), "", &body);
return send(beta_ ? Call::kRevisionQuery : Call::kRevisionQueryV1, revision_of(id, revision), "", &body);
}
std::size_t AgentRuntime::stream_query_revision(const std::string& id, const std::string& revision,
const Json& input,
const GoogleClient::EventSink& sink,
const std::string& class_method) const {
return stream_call(Call::kRevisionStreamQuery, revision_of(id, revision),
return stream_call(beta_ ? Call::kRevisionStreamQuery : Call::kRevisionStreamQueryV1,
revision_of(id, revision),
query_body(input, class_method), sink);
}