feat(clients): sessions: Agent Sessions and Memory Bank, discovery-checked call table, guarded purge, live read probes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
// Agent Sessions: sessions and their events under one Agent Engine
|
||||
// (reasoningEngines) resource. Every call is a row in calls.h.
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#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<GoogleClient> 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<Session> 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<SessionEvent> list_events(const std::string& session_id,
|
||||
const EventListOptions& options = {}) const;
|
||||
};
|
||||
|
||||
} // namespace molo::google::sessions
|
||||
Reference in New Issue
Block a user