feat(clients): sessions+registry+optimize+armor: close gaps, loud list truncation, shared Gemini adapter
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>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
// Operations of online evaluators (aiplatform v1
|
||||
// projects.locations.onlineEvaluators.operations: get, list, cancel, delete,
|
||||
// wait). An online evaluator's activate, suspend and create calls return
|
||||
// long-running operations that live under the evaluator.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "google/operation.h"
|
||||
#include "google/optimize/optimize_service.h"
|
||||
#include "google/resource.h"
|
||||
|
||||
namespace molo::google::optimize {
|
||||
|
||||
struct OperationPage {
|
||||
std::vector<Operation> operations;
|
||||
bool truncated = false; // More existed past the page/item caps.
|
||||
std::string next_page_token; // Continues a truncated list.
|
||||
};
|
||||
|
||||
class OnlineEvaluatorOperations : public OptimizeService {
|
||||
public:
|
||||
OnlineEvaluatorOperations(std::shared_ptr<GoogleClient> client, CloudContext context);
|
||||
|
||||
// Names: projects/{p}/locations/{l}/onlineEvaluators/{id}/operations/{op}.
|
||||
static bool is_operation_name(const std::string& name);
|
||||
|
||||
clients::body::Json get(const std::string& operation_name) const;
|
||||
// Operations under projects/{p}/locations/{l}/onlineEvaluators/{id}.
|
||||
OperationPage list(const std::string& evaluator_name, const std::string& filter = "",
|
||||
int page_size = 0) const;
|
||||
void cancel(const std::string& operation_name) const;
|
||||
// Destructive: removes the operation record only.
|
||||
void remove(const std::string& operation_name) const;
|
||||
// One server-side wait, 1..OptimizeCaps::kMaxServerWaitSeconds; the reply
|
||||
// may be not done. A failed operation throws.
|
||||
Operation wait_server(const std::string& operation_name, int timeout_seconds) const;
|
||||
};
|
||||
|
||||
} // namespace molo::google::optimize
|
||||
Reference in New Issue
Block a user