openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
33 lines (32 loc) • 1.69 kB
TypeScript
import { a as SessionEntry } from "./types-QMIFj7bE.js";
import { t as loadCombinedSessionStoreForGateway } from "./combined-store-gateway-C8EXmEPe.js";
//#region src/plugin-sdk/session-transcript-hit.d.ts
/** Canonical session identity parsed from a transcript search-hit path. */
type SessionTranscriptHitIdentity = {
stem: string;
liveStem?: string;
ownerAgentId?: string;
archived: boolean;
};
/**
* Derive transcript stem `S` from a memory search hit path for `source === "sessions"`.
* Builtin index uses `sessions/<basename>.jsonl`; QMD exports use `<stem>.md`.
* Archived transcripts (`.jsonl.reset.<iso>` / `.jsonl.deleted.<iso>`) resolve
* to the same stem as the live `.jsonl` they were rotated from.
*/
declare function extractTranscriptStemFromSessionsMemoryHit(hitPath: string): string | null;
/** Parse live/archive ownership metadata from a sessions-memory hit path. */
declare function extractTranscriptIdentityFromSessionsMemoryHit(hitPath: string): SessionTranscriptHitIdentity | null;
/**
* Map transcript stem to canonical session store keys (all agents in the combined store).
* Session tools visibility and agent-to-agent policy are enforced by the caller (e.g.
* `createSessionVisibilityGuard`), including cross-agent cases.
*/
declare function resolveTranscriptStemToSessionKeys(params: {
store: Record<string, SessionEntry>;
stem: string;
archivedOwnerAgentId?: string;
allowQmdSlugFallback?: boolean;
}): string[];
//#endregion
export { SessionTranscriptHitIdentity, extractTranscriptIdentityFromSessionsMemoryHit, extractTranscriptStemFromSessionsMemoryHit, loadCombinedSessionStoreForGateway, resolveTranscriptStemToSessionKeys };