fix: restore public store and invalidateSession on LettaBot (#515)

This commit is contained in:
Cameron
2026-03-06 12:04:05 -08:00
committed by GitHub
parent c71c45150e
commit ead65ff1e7

View File

@@ -187,7 +187,7 @@ export function resolveHeartbeatConversationKey(
}
export class LettaBot implements AgentSession {
private store: Store;
readonly store: Store;
private config: BotConfig;
private channels: Map<string, ChannelAdapter> = new Map();
private messageQueue: Array<{ msg: InboundMessage; adapter: ChannelAdapter }> = [];
@@ -485,6 +485,14 @@ export class LettaBot implements AgentSession {
return this.sessionManager.warmSession();
}
/**
* Invalidate cached session(s), forcing a fresh session on next message.
* The next message will create a fresh session using the current store state.
*/
invalidateSession(key?: string): void {
this.sessionManager.invalidateSession(key);
}
// =========================================================================
// Channel management
// =========================================================================