refactor: trim gateway session type exports

This commit is contained in:
Peter Steinberger
2026-05-01 23:05:37 +01:00
parent 58f2d17e9e
commit 47009dd718
5 changed files with 9 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
export type GatewayBroadcastStateVersion = {
type GatewayBroadcastStateVersion = {
presence?: number;
health?: number;
};

View File

@@ -12,18 +12,18 @@ type SessionHistoryTranscriptMeta = {
seq?: number;
};
export type SessionHistoryMessage = Record<string, unknown> & {
type SessionHistoryMessage = Record<string, unknown> & {
__openclaw?: SessionHistoryTranscriptMeta;
};
export type PaginatedSessionHistory = {
type PaginatedSessionHistory = {
items: SessionHistoryMessage[];
messages: SessionHistoryMessage[];
nextCursor?: string;
hasMore: boolean;
};
export type SessionHistorySnapshot = {
type SessionHistorySnapshot = {
history: PaginatedSessionHistory;
rawTranscriptSeq: number;
};

View File

@@ -25,7 +25,7 @@ type PersistedLifecycleSessionShape = Pick<
"updatedAt" | "status" | "startedAt" | "endedAt" | "runtimeMs" | "abortedLastRun"
>;
export type GatewaySessionLifecycleSnapshot = Partial<LifecycleSessionShape>;
type GatewaySessionLifecycleSnapshot = Partial<LifecycleSessionShape>;
function isFiniteTimestamp(value: unknown): value is number {
return typeof value === "number" && Number.isFinite(value) && value > 0;

View File

@@ -13,7 +13,7 @@ import {
} from "../config/sessions/paths.js";
import { resolveRequiredHomeDir } from "../infra/home-dir.js";
export type ArchiveFileReason = SessionArchiveReason;
type ArchiveFileReason = SessionArchiveReason;
export type ArchivedSessionTranscript = {
sourcePath: string;
archivedPath: string;

View File

@@ -169,13 +169,13 @@ export function readSessionMessages(
return messages;
}
export type ReadRecentSessionMessagesOptions = {
type ReadRecentSessionMessagesOptions = {
maxMessages: number;
maxBytes?: number;
maxLines?: number;
};
export type ReadRecentSessionMessagesResult = {
type ReadRecentSessionMessagesResult = {
messages: unknown[];
totalMessages: number;
};
@@ -746,7 +746,7 @@ export function readLastMessagePreviewFromTranscript(
});
}
export type SessionTranscriptUsageSnapshot = {
type SessionTranscriptUsageSnapshot = {
modelProvider?: string;
model?: string;
inputTokens?: number;