File-backed session store for external messaging channels.
aisdk::ChannelSessionStore -> FileChannelSessionStore
base_dirBase directory for persisted channel sessions.
new()Initialize a file-backed channel session store.
FileChannelSessionStore$new(base_dir)base_dirBase directory for store files.
get_session_path()Get the on-disk session file path for a key.
FileChannelSessionStore$get_session_path(session_key)session_keySession key.
Absolute file path.
get_index_path()Get the channel index path.
FileChannelSessionStore$get_index_path()Absolute file path.
list_sessions()List all session records.
FileChannelSessionStore$list_sessions()Named list of session records.
has_processed_event()Check whether an event id has already been processed.
FileChannelSessionStore$has_processed_event(channel_id, event_id)channel_idChannel identifier.
event_idEvent identifier.
Logical scalar.
mark_processed_event()Mark an event id as processed.
FileChannelSessionStore$mark_processed_event(
channel_id,
event_id,
payload = NULL
)channel_idChannel identifier.
event_idEvent identifier.
payloadOptional event payload to keep in the dedupe index.
Invisible stored event record.
get_record()Get a single session record.
FileChannelSessionStore$get_record(session_key)session_keySession key.
Session record or NULL.
load_session()Load a persisted ChatSession.
FileChannelSessionStore$load_session(
session_key,
tools = NULL,
hooks = NULL,
registry = NULL
)session_keySession key.
toolsOptional tools to reattach.
hooksOptional hooks to reattach.
registryOptional provider registry.
A ChatSession or NULL if no persisted state exists.
save_session()Save a ChatSession and update the local index.
FileChannelSessionStore$save_session(session_key, session, record = NULL)session_keySession key.
sessionChatSession instance.
recordOptional record fields to merge into the index.
Invisible normalized record.
update_record()Update a record without saving a session file.
FileChannelSessionStore$update_record(session_key, record)session_keySession key.
recordRecord fields to merge.
Invisible updated record.
link_child_session()Register a child session relationship.
FileChannelSessionStore$link_child_session(
parent_session_key,
child_session_key
)parent_session_keyParent session key.
child_session_keyChild session key.
Invisible updated parent record.
clone()The objects of this class are cloneable with this method.
FileChannelSessionStore$clone(deep = FALSE)deepWhether to make a deep clone.