#pragma once // Agent Sessions: sessions and their events under one Agent Engine // (reasoningEngines) resource. Every call is a row in calls.h. #include #include #include #include "google/sessions/engine_service.h" #include "google/sessions/session_types.h" namespace molo::google::sessions { class Sessions : public EngineService { public: // `sleeper` replaces the real sleep between operation polls (tests). Sessions(std::shared_ptr client, EngineName engine, Sleeper sleeper = nullptr); Session create(const SessionSpec& spec) const; // waits for the operation Session get(const std::string& session_id) const; std::vector list(const SessionListOptions& options = {}) const; Session patch(const SessionPatch& patch) const; // Destructive: explicit method, waits for the delete operation. void delete_session(const std::string& session_id) const; // Rewrites the event history (summary and/or edits); waits. void compact(const std::string& session_id, const CompactRequest& request) const; void append_event(const std::string& session_id, const SessionEvent& event) const; std::vector list_events(const std::string& session_id, const EventListOptions& options = {}) const; // Operations that belong to one session (create, compact, delete runs). std::vector list_session_operations( const std::string& session_id, const OperationListOptions& options = {}) const; }; } // namespace molo::google::sessions