import { _ as visitSessionMessagesAsync$1, a as readRecentSessionMessagesWithStatsAsync$1, c as readSessionMessageByIdAsync$1, d as readSessionMessagesAsync$1, f as readSessionMessagesWithSourceAsync$1, h as readSessionTitleFieldsFromTranscriptAsync$1, i as readRecentSessionMessagesAsync$1, l as readSessionMessageCountAsync$1, m as readSessionTitleFieldsFromTranscript$1, o as readRecentSessionTranscriptLines$1, p as readSessionPreviewItemsFromTranscript$1, s as readRecentSessionUsageFromTranscript$1 } from "./session-utils.fs-Cg5WmMiT.js";
//#region src/gateway/session-transcript-readers.ts
/** Reads display messages asynchronously through the reader seam. */
async function readSessionMessagesAsync(scope, opts) {
	return await readSessionMessagesAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, opts, scope.agentId);
}
/** Reads display messages with source metadata through the reader seam. */
async function readSessionMessagesWithSourceAsync(scope, opts) {
	return await readSessionMessagesWithSourceAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, opts, scope.agentId);
}
/** Reads recent display messages asynchronously through the reader seam. */
async function readRecentSessionMessagesAsync(scope, opts) {
	return await readRecentSessionMessagesAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, opts, scope.agentId);
}
/** Finds one display message by transcript id through the reader seam. */
async function readSessionMessageByIdAsync(scope, messageId, opts) {
	return await readSessionMessageByIdAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, messageId, {
		...opts,
		agentId: scope.agentId
	});
}
/** Visits display messages asynchronously through the reader seam. */
async function visitSessionMessagesAsync(scope, visit, opts) {
	return await visitSessionMessagesAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, visit, opts, scope.agentId);
}
/** Counts display messages asynchronously through the reader seam. */
async function readSessionMessageCountAsync(scope) {
	return await readSessionMessageCountAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, scope.agentId);
}
/** Reads recent messages with total-count metadata asynchronously through the reader seam. */
async function readRecentSessionMessagesWithStatsAsync(scope, opts) {
	return await readRecentSessionMessagesWithStatsAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, opts, scope.agentId);
}
/** Reads a bounded transcript tail for compaction and diagnostics through the reader seam. */
function readRecentSessionTranscriptLines(params) {
	return readRecentSessionTranscriptLines$1({
		sessionId: params.sessionId,
		storePath: params.storePath,
		sessionFile: params.sessionFile,
		agentId: params.agentId,
		maxLines: params.maxLines
	});
}
/** Reads title and preview text from a transcript through the reader seam. */
function readSessionTitleFieldsFromTranscript(scope, opts) {
	return readSessionTitleFieldsFromTranscript$1(scope.sessionId, scope.storePath, scope.sessionFile, scope.agentId, opts);
}
/** Reads title and preview text asynchronously through the reader seam. */
async function readSessionTitleFieldsFromTranscriptAsync(scope, opts) {
	return await readSessionTitleFieldsFromTranscriptAsync$1(scope.sessionId, scope.storePath, scope.sessionFile, scope.agentId, opts);
}
/** Reads aggregate usage from a bounded transcript tail synchronously through the reader seam. */
function readRecentSessionUsageFromTranscript(scope, maxBytes) {
	return readRecentSessionUsageFromTranscript$1(scope.sessionId, scope.storePath, scope.sessionFile, scope.agentId, maxBytes);
}
/** Reads compact session preview items through the reader seam. */
function readSessionPreviewItemsFromTranscript(scope, maxItems, maxChars) {
	return readSessionPreviewItemsFromTranscript$1(scope.sessionId, scope.storePath, scope.sessionFile, scope.agentId, maxItems, maxChars);
}
//#endregion
export { readSessionMessageByIdAsync as a, readSessionMessagesWithSourceAsync as c, readSessionTitleFieldsFromTranscriptAsync as d, visitSessionMessagesAsync as f, readRecentSessionUsageFromTranscript as i, readSessionPreviewItemsFromTranscript as l, readRecentSessionMessagesWithStatsAsync as n, readSessionMessageCountAsync as o, readRecentSessionTranscriptLines as r, readSessionMessagesAsync as s, readRecentSessionMessagesAsync as t, readSessionTitleFieldsFromTranscript as u };
