Skip to main content

gadk_session/
lib.rs

1// Copyright 2026 Chris Olson
2// Portions derived from ADK-Go (https://github.com/google/adk-go), Copyright 2026 Google LLC.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//     http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! gadk-session: sessions, events, and the in-memory session service.
17
18pub mod compaction;
19mod error;
20mod event;
21mod inmemory;
22mod legacy;
23mod requested_auth;
24mod service;
25pub mod state_util;
26mod tool_confirmation;
27pub mod toolauth;
28
29/// Reusable conformance suite for [`SessionService`] implementations.
30#[cfg(feature = "testsuite")]
31pub mod testsuite;
32
33#[cfg(test)]
34#[allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
35mod parity_tests;
36
37pub use error::SessionError;
38pub use event::{
39    Event, EventActions, EventCompaction, EventRef, NodeInfo, RequestInput, zero_time,
40};
41pub use inmemory::InMemorySessionService;
42pub use service::{
43    CreateRequest, DeleteRequest, GetRequest, KEY_PREFIX_APP, KEY_PREFIX_TEMP, KEY_PREFIX_USER,
44    ListRequest, ReadonlyState, Session, SessionService, State, compare_by_last_update,
45};
46pub use tool_confirmation::ToolConfirmation;