Files
openclaw/src/plugin-sdk/session-store-runtime.ts
Josh Lehman f1b8827d20 refactor: route bundled plugin session callers through seam (#89129)
Merged via squash.

Prepared head SHA: 7975bc06ac
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-06-14 12:26:53 -07:00

48 lines
1.8 KiB
TypeScript

// Narrow session-store helpers for channel hot paths.
import {
listSessionEntries,
loadSessionEntry as getSessionEntry,
readSessionUpdatedAt,
} from "../config/sessions/session-accessor.js";
import { loadSessionStore as loadSessionStoreImpl } from "../config/sessions/store-load.js";
/**
* @deprecated Use getSessionEntry/listSessionEntries for reads and
* patchSessionEntry/upsertSessionEntry for writes. loadSessionStore keeps the
* legacy mutable whole-store shape and will remain a compatibility escape hatch.
*/
export const loadSessionStore = loadSessionStoreImpl;
export { getSessionEntry, listSessionEntries, readSessionUpdatedAt };
export { resolveSessionStoreEntry } from "../config/sessions/store-entry.js";
export {
resolveSessionFilePath,
resolveSessionTranscriptPathInDir,
resolveStorePath,
} from "../config/sessions/paths.js";
export { resolveAndPersistSessionFile } from "../config/sessions/session-file.js";
export { readLatestAssistantTextFromSessionTranscript } from "../config/sessions/transcript.js";
export { resolveSessionKey } from "../config/sessions/session-key.js";
export { resolveGroupSessionKey } from "../config/sessions/group.js";
export { canonicalizeMainSessionAlias } from "../config/sessions/main-session.js";
export {
clearSessionStoreCacheForTest,
patchSessionEntry,
recordSessionMetaFromInbound,
saveSessionStore,
updateLastRoute,
updateSessionStore,
updateSessionStoreEntry,
upsertSessionEntry,
} from "../config/sessions/store.js";
export {
evaluateSessionFreshness,
resolveChannelResetConfig,
resolveSessionResetPolicy,
resolveSessionResetType,
resolveThreadFlag,
} from "../config/sessions/reset.js";
export { resolveSendPolicy } from "../sessions/send-policy.js";
export type { SessionEntry, SessionScope } from "../config/sessions/types.js";