import { o as SessionEntry } from "./types-DMRlw0x0.js";
//#region src/sessions/transcript-events.d.ts
/** Normalized transcript update emitted after a session transcript changes. */
type SessionTranscriptUpdate = {
  sessionFile: string;
  sessionKey?: string;
  agentId?: string;
  message?: unknown;
  messageId?: string;
  messageSeq?: number;
};
type SessionTranscriptListener = (update: SessionTranscriptUpdate) => void;
/** Registers a listener for normalized session transcript updates. */
declare function onSessionTranscriptUpdate(listener: SessionTranscriptListener): () => void;
/** Emits a normalized transcript update to all registered listeners. */
declare function emitSessionTranscriptUpdate(update: string | SessionTranscriptUpdate): void;
//#endregion
//#region src/config/sessions/session-accessor.d.ts
/**
 * Session access API for callers that need entries or transcripts without
 * depending on the persisted store layout. Callers provide stable session
 * identity, and this module resolves the current entry/transcript target while
 * preserving canonical-key, transcript-linking, and update-notification rules.
 *
 * Ownership contract (#88838): this accessor is the permanent storage-neutral
 * domain boundary for session/transcript runtime access; the SQLite storage
 * flip implements this interface. The entry workflow helpers in store.ts are
 * the file-backend implementation it delegates to plus the plugin-SDK
 * deprecation-window surface (RFC 0007); they become internal as direct
 * callers migrate here. New runtime callers use this module, not store.ts.
 */
type SessionAccessScope = {
  /** Agent owner used when the session key does not already encode one. */agentId?: string;
  /**
   * Set false only for internal read-only hot paths that will not retain or
   * mutate the returned entry.
   */
  clone?: boolean; /** Environment override used when resolving agent-scoped store paths in tests/tools. */
  env?: NodeJS.ProcessEnv; /** Set false for metadata-only reads that do not need hydrated prompt refs. */
  hydrateSkillPromptRefs?: boolean; /** Canonical or alias session key for the entry being read or written. */
  sessionKey: string; /** Explicit store path for callers that already resolved the owning store. */
  storePath?: string;
};
type SessionEntrySummary = {
  /** Persisted key for the entry. */sessionKey: string; /** Entry value cloned from the backing store unless the caller requested borrowed reads. */
  entry: SessionEntry;
};
/** Returns the entry for a canonical or alias session key, if one exists. */
declare function loadSessionEntry(scope: SessionAccessScope): SessionEntry | undefined;
/** Lists entries from the resolved store, preserving the persisted key for each row. */
declare function listSessionEntries(scope?: Partial<Omit<SessionAccessScope, "sessionKey">>): SessionEntrySummary[];
/** Reads the last activity timestamp for one session entry, or undefined when absent. */
declare function readSessionUpdatedAt(scope: SessionAccessScope): number | undefined;
//#endregion
export { onSessionTranscriptUpdate as a, emitSessionTranscriptUpdate as i, loadSessionEntry as n, readSessionUpdatedAt as r, listSessionEntries as t };